Closed billsacks closed 2 years ago
I did some investigation recently with the new, CISM 4-km grid and the f09_g16 (or maybe f09_g17?) CLM grid. I found that, at initialization, the only CLM cells that partially overlap the (full, static) CISM grid have icemask = 0. So, absent any changes in icemask over time, this wouldn't be an issue for our current standard configuration. However, we should still address this because:
The icemask can grow over time
Other grids can be used which may have this problem (i.e., may have a CLM cell that partially overlaps the CISM grid, where at least 1 overlapping CISM grid cell has icemask = 1).
@billsacks , Thanks for thinking this through. I agree with your reasoning. Assuming that your understanding in (1) of norm=.true.is correct, I think we want norm = .false. for this mapping. And since the issue doesn't affect the current grid CISM/CLM grids, I agree that the resolution can wait a few weeks.
I've done some more thinking and looked through the code a bit more, and I think my understanding was correct. In particular: I'm pretty sure that, in the example I laid out above, Sg_icemask_l will be 1 if we use norm=.true. I'm not completely sure that using norm=.false. will give us what we want, but I think it will (and in any case, I'm pretty sure that it's more likely to give us what we want than norm=.true.). (In particular, I'm not confident in my understanding of what the mapping does when frac_b on the mapping file is less than 1. But from a quick look through the code, I don't see any handling of the frac_b field, which suggests that my understanding laid out in the original comment is probably correct. I also wondered if the mapping files might be set up to implicitly do some normalization in the case where frac_b < 1, but I think not, partly based on CLM's mksurfdata_map code: mkgridmapMod.F90: gridmap_areaave_default.)
So I'm ready to sign off on action items 1 and 2 from my original comment. What remains is doing the code mods: action items 3 and 4.
Closing this and opening https://github.com/ESCOMP/CMEPS/issues/252 in its place
One of the fields mapped from glc to lnd is Sg_icemask, which gives a dynamic view of the (land + ice)-covered portion of the GLC domain (i.e., excluding open ocean, which cannot accept SMB). Currently, this field is mapped with norm=.true. I haven't thought about this in a while, but I'm now thinking this should actually be mapped with norm=.false.
I went back through a bunch of old notes on this, and couldn't find any notes about why I chose norm=.true. for this field. (Especially see https://docs.google.com/document/d/1sjsaiPYsPJ9A7dVGJIHGg4rVIY2qF5aRXbNzSXVAafU/edit# and https://docs.google.com/document/d/144PZ63gwpz875U4EYEI7NuxnF__V955QJOxV9LcEAL0/edit .)
I suspect that I didn't give this much thought at the time, because until now the exact value of icemask / icemask_coupled_fluxes on the land grid hasn't mattered at all: all that has mattered is whether it is 0 or > 0. But now we're handling this more correctly in CLM, so the exact value of icemask / icemask_coupled_fluxes begins to matter.
If I understand the norm=.true. option correctly (which I may not: it's been a while since I've studied the mapping code carefully): I think it means that (for example) if we have a lnd grid cell that is 1/2 inside and 1/2 outside the (full, static) glc grid, and all overlapping glc grid cells have Sg_icemask_g = 1: then Sg_icemask_l = 1. But I think that's not what we want: I think we want Sg_icemask_l to account for areas outside the (full, static) glc grid the same as it would account for areas inside the (full, static) glc grid but with Sg_icemask_g = 0. i.e., I think the above example should be equivalent to the case where the lnd cell is entirely within the (full, static) glc grid, but 1/2 of the overlapping glc grid cells have Sg_icemask_g = 0.
One consequence of the current treatment (which I noticed when bringing in an extended CISM grid from Joe Kennedy) is that Sg_icemask_l can change just by extending the CISM grid, even when the newly-added grid cells have Sg_icemask_g = 0. Again, I think this behavior is wrong, and I think it would be fixed by mapping Sg_icemask with norm=.false.
A few other notes:
Whatever treatment is done for Sg_icemask, the same treatment should be done for Sg_icemask_coupled_fluxes.
These mappings are done in prep_lnd_mod: prep_lnd_calc_g2x_lx, in this call:
Action items to address this
[x] 1: Confirm my understanding of norm=.true. in the seq_map_map call. Does this indeed mean that (for example) if we have a lnd grid cell that is 1/2 inside and 1/2 outside the (full, static) glc grid, and all overlapping glc grid cells have Sg_icemask_g = 1: then Sg_icemask_l = 1?
[x] 2: Think a bit more, and talk with @whlipscomb to confirm: If my understanding in (1) is right, then I think we do want to change this to norm = .false., so that Sg_icemask_l = 0.5 in the above example.
[ ] 3: Rework the mapping in prep_lnd_calc_g2x_lx to use norm = .false. for Sg_icemask and Sg_icemask_coupled_fluxes. I'm not sure what we want for any other fields (if there are any) that are handled by the seq_map_map call in that routine. And do we actually want to weight any other fields' mappings by Sg_icemask, as is done for the fields mapped in map_glc2lnd_ec?
[ ] 4: Change the mapping of Sg_icemask in prep_glc_map_qice_conservative_lnd2glc similarly.