GEOS-ESM / GEOSgcm_GridComp

Repository containing the physics and IAU code for the GEOS Earth System Model
Apache License 2.0
9 stars 7 forks source link

updates to catchment restart regridding #116

Open JustinPerket opened 4 years ago

JustinPerket commented 4 years ago

This can be considered parts 2 and 3 of 3 fixes/upgrades to how catchment regridding treats tile sampling.

_See comment by @gmao-rreichle in https://github.com/GEOS-ESM/GEOSgcm_GridComp/pull/92#issuecomment-540089789_

this fix addresses the most important of three separate problems with regrid. The other two are (i) the spatial mapping of source and target tiles and (ii) consideration of the WEMIN parameter in the regridding of snow depth. These are being addressed.

These parts are:

  1. Addressed by @smahanam with #92 . Fix so that soil heat content deliveries consistent soil temperature with regridding (with consideration for ice fraction).
  2. updating the spatial mapping of source and target tiles to be more accurate (but a bit slower)
  3. considering the model parameter WEMIN, which should be consistent with both input and output restarts. WEMIN can be considered the threshold value that controls the linear ramp between snow water equivalent and snow fraction: image It decreases between Old Land and New Land, and regridding should be able to account for it's affect.

@smahanam is making good progress on (2), and we're firming up our plan for (3). @wmputman has been given a heads up.

JustinPerket commented 4 years ago

This issue will need pull request from multiple branches/repos, mostly due to adding WEmin input and output options to regridding-related tools.

smahanam commented 4 years ago

@JustinPerket, I want to let you know that I and @gmao-jstassi found that https://github.com/GEOS-ESM/GMAO_Shared/compare/feature/jstassi/added-wemin-wemout-options

may need a minor update. Joe is currently looking in to it.

JustinPerket commented 4 years ago

@smahanam @gmao-jstassi , I was just looking into the WEmin options, and just conversed with @gmao-rreichle. Per Rolf:

I think the original intention was to make the user enter a value or pick a value from a list after providing a brief help guide and perhaps suggesting a default. I think we do NOT want to just have a default be used unless it's explicitly approved by the user.

Would it be possible to change to this behavior?

JustinPerket commented 4 years ago

Also, it loos like mk_LDASsaRestarts on the GEOSgcmGC repo, and process_rst.csh on the GEOSldas repo have to updated to work with the new Scale_Catch(CN) options

smahanam commented 4 years ago

After talking to Randy, I actually suggested this simple (non-confusing) option for AGCM regridding to Joe. Majority of the AGCM users don't know or don't care about WEMIN as much as we don't care about what is happening in Chem_GridComps when we set up experiments. Also, snow has a very short memory unlike deep soil temperature. Unless, for very specific cases, I thought creating this confusion is not necessary, we usually throw away first few years if we start from MERRA2 restarts, anyway. Those who need to know about this option know it is available.

Anyway, @gmao-jstassi please see regrid.pl seems need further updates.

smahanam commented 4 years ago

Also, it loos like mk_LDASsaRestarts on the GEOSgcmGC repo, and process_rst.csh on the GEOSldas repo have to updated to work with the new Scale_Catch(CN) options

mk_LDASsaRestarts was updated with all other F90 codes.

process_rst.csh on the GEOSldas repo: Yes I thought you created an issue and assign @weiyuan-jiang

JustinPerket commented 4 years ago

mk_LDASsaRestarts was updated with all other F90 codes.

Sorry, should have specified. There's 3 Scale_Catch(CN) commands being written around this line https://github.com/GEOS-ESM/GEOSgcm_GridComp/blob/3f895826563672045abe55dcc65bcd19794ac43e/GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/GEOSland_GridComp/GEOScatch_GridComp/mk_restarts/mk_LDASsaRestarts.F90#L228

it's in a if (JOBFILE == 'N') statement. Shouldn't these now have WEMIN inputs?

process_rst.csh on the GEOSldas repo: Yes I thought you created an issue and assign @weiyuan-jiang I must have forgot to create the issue. I can't see it now.

smahanam commented 4 years ago

I see - that part came from the original code - at that time we did not have a ldas_setup - the program collected user inputs and created a job file. Now, everyone runs mk_LDASsaRestarts.F90 through ldas_setup. Fanwei occasionally used to run mk_LDASsarestarts directly for her special cases, I showed her recently that she can still use ldas_setup for her specific cases too.

Anyway, for accuracy, you can ask @weiyuan-jiang update that section.

JustinPerket commented 4 years ago

Ok, I think we're ready to go to merge:

https://github.com/GEOS-ESM/GEOSgcm_GridComp/tree/feature/jstassi/added-wemin-wemout-options https://github.com/GEOS-ESM/GMAO_Shared/compare/feature/jstassi/added-wemin-wemout-options https://github.com/GEOS-ESM/GEOSldas/compare/feature/regrid_updates

I can create draft pull requests for these

JustinPerket commented 4 years ago

PRs created, drafts for now.

smahanam commented 4 years ago

@atrayano @zhaobin74 @yvikhlya, I am not sure whether this message will reach you via github. I'll check that with one of you. FYI, land models needed an accurate regridding algorithm than the simplified approach in getids.H. So after this modification, mk_CatchRestarts, and mk_CatchCNRestarts do not use old getids.H algorithm for regridding.

If mk_LandIce or any other surface needs a more accurate way to find the nearest neighbor, that can follow new land regridding- which computes arc-distances to the neighbors.

JustinPerket commented 4 years ago

@sdrabenh @wmputman, I'm taking the PRs out of draft. For the GCM they are:

https://github.com/GEOS-ESM/GEOSgcm_GridComp/pull/158 https://github.com/GEOS-ESM/GMAO_Shared/pull/62

For LDAS it's https://github.com/GEOS-ESM/GEOSldas/pull/62

JustinPerket commented 4 years ago

mpi usage of mk_CatchRestarts in #158 is now tested to be 0 diff