You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My previous PR (#402) didn't get fully tested due to problems running the model in image mode. Now that the model is working, I've found a few problems with state file i/o:
call to vic_store() was commented out due to not working with MPI
state file hard-coded to be written at end of simulation
state file name has date appended twice
errors attempting to write lat/lon values
errors attempting to write all other coordinate variables
lat/lon values read by vic_restore() didn't match those from parameter files
The fixes for these issues are almost complete and include:
To address issues 2 and 3:
implementing a new function, image/src/check_save_state_flag(), which compares current date to state date and returns true if they're the same, false otherwise (a different version of this function can be implemented in the cesm driver if desired); this will replace the condition if (current == global_param.nrecs - 1)
adding global_param.statesec in vic_def.h and including the statesec value in the output state file name (as is already being done in vic_store() using dmy[current].daysecond)
modifying get_global_param.c in both classic and image drivers to look for a STATESEC value in addition to STATEYEAR, STATEMONTH, and STATEDAY
modifying the sample global parameter files in classic and image drivers to add a STATESEC entry
adding STATESEC to classic and image display_current_settings.c
To address issues 4 and 6:
moving logic of initialize_state_file() to vic_store() and eliminating initialize_state_file() - this function is actually unnecessary since the initialization and writing all occur at the same time, and as it currently is, it's splitting file definition-related commands between the two functions, thus preventing lat/lon values from being written
changing the lat/lon indexing for the 1-dimensional case in both vic_store() and vic_restore(), since a stride is needed in looping over the global_domain.location[] array
To address issue 5:
for 1-d coordinate variables like "veg_class" and "dz_node", replacing calls to gather_put_nc_field_xxx(), which assumes the data are spatial fields that must be masked, with calls to put_nc_field_xxx()
To address issue 1:
uncommenting call to vic_store() in vic_image()
enclosing all dimension and coordinate variable definition and writing commands in an if (mpi_rank == 0) block
The text was updated successfully, but these errors were encountered:
My previous PR (#402) didn't get fully tested due to problems running the model in image mode. Now that the model is working, I've found a few problems with state file i/o:
The fixes for these issues are almost complete and include:
To address issues 2 and 3:
if (current == global_param.nrecs - 1)
To address issues 4 and 6:
To address issue 5:
To address issue 1:
if (mpi_rank == 0)
blockThe text was updated successfully, but these errors were encountered: