| Los Alamos |
|
|
| NCAR Links |
|
|
CCSM-POPRunning SCRIP at NCARExample of running SCRIP to produce a mapping fileThis example maps between gx3 and T42 grids using conservative area-averaging and the "destarea" normalization convention (see the SCRIP user's guide for explanation of these two choices). For the sake of presentation it is assumed that the T42 grid file which is to be read in by SCRIP is pre-existing while the gx3 file must be created. SetupCopy SCRIP from most recent scrip directory, under the soft link /fs/cgd/csm/mapping/SCRIP (or get it from the Los Alamos web site). In subdirectory grids/ modify file convertPOPT.f in order to generate gx3 grid file for input to SCRIP.
This will entail editing nx, ny, grid_name, grid_file_in,
grid_topo_in and grid_file_out. In source/ prompt% make scrip Creating a Grid FileIn grids/
prompt% convertPOPT Creating the Mapping FileIn /fs/cgd/csm/mapping/SCRIP:
Create an input namelist file for the scrip program, named scrip_in. For this
present case the contents would be
&remap_inputs
num_maps = 2,
grid1_file = 'grids/gx3.nc'
grid2_file = '/fs/cgd/csm/mapping/grids/T42.nc',
interp_file1 = 'map_gx3_to_T42_aave_da.nc'
interp_file2 = 'map_T42_to_gx3_aave_da.nc'
map1_name = 'gx3 to T42 Mapping',
map2_name = 'T42 to gx3 Mapping',
map_method = 'conservative',
normalize_opt = 'destarea'
output_opt = 'ncar-csm'
restrict_type = 'latlon'
num_srch_bins = 10
Notice that the path to the gx3 grid file is local, as this grid file
was just created in the previous step, whereas the path to the
pre-existing T42 grid file points to the CCSM grid repository.
map_method = 'conservative'
normalize_opt = 'destarea'
output_opt = 'ncar-csm'
Now run scrip:
prompt% scrip > map_gx3_and_T42_aave_da.out Testing of WeightsIn the SCRIP directory: create an input file for the scrip_test program, named scrip_test_in. For the present case, in order to test the mapping from T42 to gx3 grids the contents would be:
&remap_inputs
field_choice = 2
interp_file = 'map_T42_to_gx3_aave_da.nc'
output_file = 'out_T42_to_gx3_aave_da.nc'
Now run scrip_test:
prompt% scrip_test > ! test_T42_to_gx3_aave_da.out Now repeat the test, but for the reverse mapping (from gx3 to T42). CautionSome test code exists in the coupler which:
For now, this information must be inspected the first time a map is used by the coupler. In the future we may have stand-alone code to do this. |