-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement/generalize saved state #64
Enhancement/generalize saved state #64
Conversation
I added two saved state arrays to marbl_interface_class -- one for surface forcing and one for interior forcing. There are also two corresponding index types. Two major changes I see needing to happen: 1. I hardcoded the number '2' for how many saved state variables there are (ph and ph_alt_co2) in both the surface and interior types. I think the optimal setup would be similar to surface forcing output, where the arrays are "re-allocatable". 2. I think we want a marbl_saved_state_mod to house some of the initialization routines, rather than calling add_saved_state directly from marbl_instance%init.
I was adding fields to the surface forcing saved state rather than interior, which was resulting in out of memory errors. Also, I wasn't processing the log output after returning from "add to saved state" calls.
Currently only support rank 2 and rank 3 saved state variables, and rank has to be compatible with vgrid ('none' for rank=2, and either 'layer_avg' or 'layer_iface' for rank=3). I hope this allows us to add rank=0 for global sums, but I'm not sure exactly what that will look like since MARBL will need to pass out the full 2D field so the GCM can do the area-weighting for computation.
Forgot a pretty important line in the last commit...
Looking through the code diffs after commit fbb3be2, there is still a little more work to be done. I'll continue to clean this code up and let you know when it's actually ready to be reviewed. |
I'm in the process of setting up a |
Created marbl_saved_state_mod.F90, currently only contains marbl_saved_state_init but more routines may be added down the line.
Mimicking the surface forcing output type, saved state uses pointers to "reallocate" memory when adding a new saved state variable.
I think this branch is ready for review. I probably need better comments in |
Forgot to note that a2baa5e passes |
* The saved state indexing types are now in marbl_internal.F90 * field_2d and field_3d in single_saved_state_type have a comment indicating the proper dimensions (in the data type definition) * Consistent spacing in saved_state_mod
9274328 using passes all tests and is bit-for-bit with baselines ( |
This branch generalizes the saved state datatype. It requires
https://svn-ccsm-models.cgd.ucar.edu/pop2/branch_tags/marbl_dev_levy_tags/marbl_dev_levy_n19_marbl_dev_n10_cesm_pop_2_1_20160513
and passes all aux_pop_MARBL tests (yellowstone_intel, yellowstone_gnu, and hobart_nag).
@klindsay28 I'm hoping we can talk about this on Friday or Monday.