Skip to content
This repository has been archived by the owner on Nov 10, 2021. It is now read-only.

Generating the Gridspec file (Mosaic Grid)

Niki Zadeh edited this page Feb 20, 2019 · 7 revisions

Creating the mosaic bundle

Once you have the horizontal supergrid and the corresponding topography grid, you can generate the gridspec (AKA Mosaic grid) that the models consume. For this you would need to obtain and compile the frenctools. This example is for gaea platform:

git clone https://github.com/NOAA-GFDL/FRE-NCtools.git 
cd FRE-NCtools/
./fre-nctools-make-package -s ncrc all
ln -s build.fre-nctools.ncrc* build

This will create a build directory. Now go to the workdir where the supergrid and topo grid are present

cd workdir
ln -s tripolar_dispsp_res8.nc ocean_hgrid.nc
ln -s topog_0125_v1.nc ocean_topog.nc
#Zhi's hot fix for the tool make_solo_mosaic
module load hdf5/1.8.8
module load mpich2/1.2.1p1
/home/z1l/bin/tools_20180214/make_solo_mosaic --num_tiles 1 --dir . --mosaic_name ocean_mosaic --tile_file ocean_hgrid.nc --periodx 360.
/net2/nnz/FRE-NCtools/build.fre-nctools.gfdl-ws.all.DESy0/tools/make_quick_mosaic/make_quick_mosaic --input_mosaic ocean_mosaic.nc --mosaic_name grid_spec --ocean_topog ocean_topog.nc
ln -s ocean_topog.nc topog.nc

You'll end up with the following files that can be copied to the INPUT/ of ocean-ice experiments to be used for model runs:

atmos_mosaic_tile1Xland_mosaic_tile1.nc
atmos_mosaic_tile1Xocean_mosaic_tile1.nc
grid_spec.nc
land_mask.nc
land_mosaic_tile1Xocean_mosaic_tile1.nc
ocean_hgrid.nc
ocean_mask.nc
ocean_mosaic.nc
ocean_topog.nc
topog_0125_v1.nc
tripolar_dispsp_res8.nc

Creating a processor mask_table

mask_tables help you avoid assigning idle cores on the land and save you the compute cost.

/net2/nnz/FRE-NCtools/build.fre-nctools.gfdl-ws.all.DESy0/tools/check_mask/check_mask --grid_file ocean_mosaic.nc --ocean_topog ocean_topog.nc --layout 120,140