ESCOMP / CAM-SIMA

Community Atmosphere Model - System for Integrated Modeling of the Atmosphere
3 stars 11 forks source link

Instantaneous CAM-SIMA history infrastructure #274

Open peverwhee opened 4 weeks ago

peverwhee commented 4 weeks ago

Overview of Changes

Documentation on design and configuration: Here

Testing

Fortran unit testing not yet implemented (see issue https://github.com/ESCOMP/CAM-SIMA/issues/273), but the following python unit tests have been added (in $SIMA/test/unit):

cacraigucar commented 1 week ago

Does it make sense to provide a template file for a physics parameterization's diagnostic package (both .F90 and .meta)? I realized that I'm probably going to copy the kessler_diagnostics example and add my own History_add_field and history_out_field. It would be nice to have a template to start the process from. Thoughts?

peverwhee commented 1 week ago

@cacraigucar I'm happy to make a template if you think that would be helpful! Would it be better or worse to just have the .F90 template and then use the metadata generator for the metadata once the fortran is populated?

cacraigucar commented 1 week ago

@cacraigucar I'm happy to make a template if you think that would be helpful! Would it be better or worse to just have the .F90 template and then use the metadata generator for the metadata once the fortran is populated?

Probably just having a template for the .F90 file and having the metadata generator run after the Fortran file is complete makes the most sense (and least amount of work for a user)

cacraigucar commented 1 week ago

@cacraigucar I'm happy to make a template if you think that would be helpful! Would it be better or worse to just have the .F90 template and then use the metadata generator for the metadata once the fortran is populated?

Probably just having a template for the .F90 file and having the metadata generator run after the Fortran file is complete makes the most sense (and least amount of work for a user)

I realized that one of the "pains" of filling in the metadata file is finding the correct standard name. Since this will already be in the add_field call, perhaps we could have a custom metadata generator for diagnostic files/metadata? This request, if folks think it makes sense, would be a new issue/PR.

peverwhee commented 1 week ago

@cacraigucar added the template here - https://github.com/peverwhee/atmospheric_physics/blob/diagnostics/cam_diagnostics/scheme_diagnostics_template.F90

peverwhee commented 1 week ago

@cacraigucar I'm happy to make a template if you think that would be helpful! Would it be better or worse to just have the .F90 template and then use the metadata generator for the metadata once the fortran is populated?

Probably just having a template for the .F90 file and having the metadata generator run after the Fortran file is complete makes the most sense (and least amount of work for a user)

I realized that one of the "pains" of filling in the metadata file is finding the correct standard name. Since this will already be in the add_field call, perhaps we could have a custom metadata generator for diagnostic files/metadata? This request, if folks think it makes sense, would be a new issue/PR.

Hmm. I do see that this is duplicated effort (putting the standard name in the add field call and also in the metadata), but I'm leaning towards it being overkill to make a new generator to avoid that step

cacraigucar commented 1 week ago

@cacraigucar added the template here - https://github.com/peverwhee/atmospheric_physics/blob/diagnostics/cam_diagnostics/scheme_diagnostics_template.F90

Perfect - I am using it now!