ClimateGlobalChange / tempestremap

TempestRemap: Remapping software for climate applications
Other
43 stars 29 forks source link

method global attribute blank for area average. #120

Open rljacob opened 1 year ago

rljacob commented 1 year ago

This is the header from an area averaged map. Looks like "method" is blank. Should it be?

// global attributes:
        :Title = "TempestRemap Offline Regridding Weight Generator" ;
        :concave_dst = "false" ;
        :concave_src = "false" ;
        :domain_a = "ne30pg2_20200209.g" ;
        :domain_b = "ocean.IcoswISC30E3r2.mask.scrip.20230901.nc" ;
        :grid_file_dst = "ocean.IcoswISC30E3r2.mask.scrip.20230901.nc" ;
        :grid_file_ovr = "oa_overlap.g" ;
        :grid_file_src = "ne30pg2_20200209.g" ;
        :method = "" ;
        :mono = "false" ;
        :nobubble = "false" ;
        :noconserve = "false" ;
        :nocorrectareas = "false" ;
        :np_dst = "1" ;
        :np_src = "1" ;
        :sparse_constraints = "false" ;
        :type_dst = "fv" ;
        :type_src = "fv" ;
        :version = "GenerateOfflineMap 2.6 : 2022-10-11"
rljacob commented 1 year ago

By contrast, the bilinear map does fill in the "method" attribute:

// global attributes:
        :Title = "TempestRemap Offline Regridding Weight Generator" ;
        :concave_dst = "false" ;
        :concave_src = "false" ;
        :domain_a = "ne30pg2_20200209.g" ;
        :domain_b = "ocean.SOwISC12to60E3r1.nomask.scrip.20230901.nc" ;
        :grid_file_dst = "ocean.SOwISC12to60E3r1.nomask.scrip.20230901.nc" ;
        :grid_file_ovr = "oa_overlap.g" ;
        :grid_file_src = "ne30pg2_20200209.g" ;
        :method = "bilin" ;
        :mono = "false" ;
        :nobubble = "false" ;
        :noconserve = "false" ;
        :nocorrectareas = "false" ;
        :np_dst = "1" ;
        :np_src = "1" ;
        :sparse_constraints = "false" ;
        :type_dst = "fv" ;
        :type_src = "fv" ;
        :version = "GenerateOfflineMap 2.6 : 2022-10-11"
dmarsico1 commented 10 months ago

@rljacob Yes, the "method" attribute should be empty for a first order area-averaged map.

The "method" argument is only used for generating maps if you want to use one of the methods "bilin," "intbilin," "invdist," "intbilingb," "delaunay" or any of the other methods listed in the block of code starting at line 223 of "GenerateOfflineMap.cpp." If one of these methods is used, then the "methods" attribute will not be blank (as in the case for bilinear remapping shown here).

rljacob commented 9 months ago

I'd like to suggest that "method" have "aavmap" or similar added for that case. Asking downstream users of TR-generated maps to remember "blank means area-averaged map" is asking to much.