Creation of bathymetry and ancillary files - NOC-MSM/RAPID-Evolution GitHub Wiki
Creation of domain_cfg files
Currently working here:
/dssgfs01/scratch/atb299/RAPID-Evolution/20240418/RAPID-Evolution/nemo/tools/DOMAINcfg/eORCA025-RAPID12-RAPID36
Associate code in (to be cleaned):
Nest_domain_check_and_create.ipynb
The AGRIF_FixedGrids.in for the double nest configuration is:
1
750 1140 710 870 3 3 3
1
18 1092 137 307 3 3 3
0
0
Attempt to follow the methodology of https://github.com/oceandie/agrif_mo/wiki/2.-AGRIF-zoom-with-a-bathymetry-consistent-with-GOSI10 to create both nests with coastlines compatible with the standard GOSI10 eORCA12 configuration. This requires Diego's code mods to force nest coastlines to match the parent when nn_bathy = 3.
If using nn_bathy = 1, the bathymetry file supplied must match the geographical domain of the nest (i.e. a cutout with the same dimensions). It cannot be a global bathymetry.
ncks -O -d y,2114,2601 -d x,2242,3419 1_eORCA12_bathymetry_v2.4_nohaloes.nc 1_eORCA12_bathymetry_v2.4_cutout.nc
cn_topo = 'eORCA12_bathymetry_v2.4_cutout.nc',
cn_bath = 'Bathymetry',
nn_bathy = 1,
ncks -O -d y,6786,7303 -d x,6788,10017 eORCA_R36_bathymetry_v3.1_wcoords.nc 2_eORCA_R36_bathymetry_v3.1_cutout.nc
The domains are built using two passes. In Pass1 the namelists are set as follows:
namelist_cfg:
&namdom
ln_read_cfg = .true.,
cn_domcfg = 'domcfg_eORCA025_v3_nohaloes.nc',
ppglam0 = 999999.0,
ppgphi0 = 999999.0,
ppe1_deg = 999999.0,
ppe2_deg = 999999.0,
ppe1_m = 999999.0,
ppe2_m = 999999.0,
ppsur = -3958.951371276829,
ppa0 = 103.9530096,
ppa1 = 2.415951269,
ppacr = 7.0,
ppkth = 15.3510137,
! rn_e3zps_min = 25.0,
! rn_e3zps_rat = 0.2,
rn_hmin = -8.,
nn_msh = 1 ! create (=1) a mesh file or not (=0)
/
&namcfg
ln_dept_mid = .true.,
cp_cfg = 'dumb',
jp_cfg = 025,
jpidta = 1440,
jpjdta = 1206,
jpkdta = 75,
ni0glo = 1440,
nj0glo = 1206,
jpkglo = 75,
jperio = 4,
ln_domclo = .true.
/
&namzgr
ln_zps = .true.,
/
&namclo ! (closed sea : need ln_domclo = .true. in namcfg) (default: OFF)
nn_closea = 0 ! number of closed seas ( = 0; only the open_sea mask will be computed)
/
1_namelist_cfg:
&namdom
cn_topo = 'eORCA12_bathymetry_v2.4_cutout.nc',
cn_bath = 'Bathymetry',
nn_bathy = 1,
nn_interp = 2,
ppglam0 = 999999.0,
ppgphi0 = 999999.0,
ppe1_deg = 999999.0,
ppe2_deg = 999999.0,
ppe1_m = 999999.0,
ppe2_m = 999999.0,
ppsur = -3958.951371276829,
ppa0 = 103.9530096,
ppa1 = 2.415951269,
ppacr = 7.0,
ppkth = 15.3510137,
! rn_e3zps_min = 25.0,
! rn_e3zps_rat = 0.2,
rn_hmin = -8.,
nn_msh = 1 ! create (=1) a mesh file or not (=0)
/
&namcfg
ln_dept_mid = .true.,
cp_cfg = 'dumb'
jp_cfg = 025,
jpidta = 1178
jpjdta = 488
jpkdta = 75,
Ni0glo = 1178
Nj0glo = 488
jpkglo = 75,
jperio = 0
ln_domclo = .true.
/
&namzgr
ln_zps = .true.,
/
&namclo ! (closed sea : need ln_domclo = .true. in namcfg) (default: OFF)
nn_closea = 0 ! number of closed seas ( = 0; only the open_sea mask will be computed)
/
2_namelist_cfg:
&namdom
cn_topo = 'eORCA_R36_bathymetry_v3.1_cutout.nc',
cn_bath = 'Bathymetry',
nn_bathy = 3,
nn_interp = 2,
ppglam0 = 999999.0,
ppgphi0 = 999999.0,
ppe1_deg = 999999.0,
ppe2_deg = 999999.0,
ppe1_m = 999999.0,
ppe2_m = 999999.0,
ppsur = -3958.951371276829,
ppa0 = 103.9530096,
ppa1 = 2.415951269,
ppacr = 7.0,
ppkth = 15.3510137,
! rn_e3zps_min = 25.0,
! rn_e3zps_rat = 0.2,
rn_hmin = -8.,
nn_msh = 1 ! create (=1) a mesh file or not (=0)
/
&namcfg
ln_dept_mid = .true.,
cp_cfg = 'dumb'
jp_cfg = 025,
jpidta = 3230
jpjdta = 518
jpkdta = 75,
Ni0glo = 3230
Nj0glo = 518
jpkglo = 75,
jperio = 0
ln_domclo = .true.
/
&namzgr
ln_zps = .true.,
/
&namclo ! (closed sea : need ln_domclo = .true. in namcfg) (default: OFF)
nn_closea = 0 ! number of closed seas ( = 0; only the open_sea mask will be computed)
/
I then merge the high resolution bathymetry with the coarse bathymetry created in 2_domain_cfg.nc to create eORCA_R36_bathymetry_v3.1_cutout_R12coasts.nc
In Pass2 I then change:
2_namelist_cfg:
cn_topo = 'eORCA_R36_bathymetry_v3.1_cutout_R12coasts.nc',
nn_bathy = 1,
and rerun. Finally the domain files are renamed for RAPID-Evolution:
mv domain_cfg.nc eORCA025-RAPID12-RAPID36_domain_cfg.nc
mv 1_domain_cfg.nc 1_eORCA025-RAPID12-RAPID36_domain_cfg.nc
mv 2_domain_cfg.nc 2_eORCA025-RAPID12-RAPID36_domain_cfg.nc
Subsetting of eORCA12 ancillary files
x
and y
values.
Identifying the correct The 1/12 zoom is xlo=750 xhi=1140 ylo=710 yhi=870 xref=3 yref=3 tref=3
. Coordinates start from 1 (Fortran), so if using Python it is necessary to subtract one from each coordinate value. By default halo sizes around the zoom are 4 nest cells in size, so these must be subtracted/added to enlarge the cutout. Hence, the zoom region is:
- xlo_nest1 = (xlo-1)*xref - 4 == 2243
- xhi_nest1 = (xhi-1)*xref + 4 == 3421
- ylo_nest1 = (ylo-1)*yref - 4 == 2123
- yhi_nest1 = (yhi-1)*yref + 4 == 2611
In practise, this did not result in nav_lon and nav_lat coordinates that agreed between the nest and the global eORCA12 domain. I had to adjust them to find agreement (why?)...
In /dssgfs01/working/atb299/NEMO_cfgs/GOSI9/GOSI9_eORCA12_config/eORCA12_inputs
:
ncks -O -d y,2114,2601 -d x,2243,3420 EN.4.1.1.f.analysis.g10.1995-2014.eORCA12.SSS.teos10.nc /dssgfs01/working/atb299/NEMO_cfgs/RAPID_Evolution/EN.4.1.1.f.analysis.g10.1995-2014.eORCA12.SSS.teos10_R12.nc
ncks -O -d y,2114,2601 -d x,2243,3420 EN.4.1.1.f.analysis.g10.1995-2014.eORCA12.salinity.teos10.nc /dssgfs01/working/atb299/NEMO_cfgs/RAPID_Evolution/EN.4.1.1.f.analysis.g10.1995-2014.eORCA12.salinity.teos10_R12.nc
ncks -O -d y,2114,2601 -d x,2243,3420 EN.4.1.1.f.analysis.g10.1995-2014.eORCA12.temperature.teos10.nc /dssgfs01/working/atb299/NEMO_cfgs/RAPID_Evolution/EN.4.1.1.f.analysis.g10.1995-2014.eORCA12.temperature.teos10_R12.nc
ncks -O -d y,2114,2601 -d x,2243,3420 shlat2d_eORCA12_southps.nc /dssgfs01/working/atb299/NEMO_cfgs/RAPID_Evolution/shlat2d_eORCA12_southps_R12.nc
ncks -O -d y,2114,2601 -d x,2243,3420 eORCA12_runoff_v2.4_GO6_ICB.nc /dssgfs01/working/atb299/NEMO_cfgs/RAPID_Evolution/eORCA12_runoff_v2.4_GO6_ICB_R12.nc
ncks -O -d lat,2114,2601 -d lon,2243,3420 eORCA12_Goutorbe_weights_bilin.nc /dssgfs01/working/atb299/NEMO_cfgs/RAPID_Evolution/eORCA12_Goutorbe_weights_bilin_R12.nc
[Of course one could use the -F
argument for ncks to avoid the need to subtract one from each coordinate, but if you work in Python it is easy to forget about this offset, when to apply it and in which direction!]
In addition to these, weights files are required for:
- JRA (bilinear and bicubic)
- merged_ESACCI_BIOMER4V1R1_CHL_REG05
- geothermal_heating_orca025ext_extrap40_v4.2.nc
- zdfiwm_forcing_eORCA025.nc
These can be cropped from existing or created for the nest domains. In /dssgfs01/working/atb299/NEMO_cfgs/Casimir
(note adjustment of lon values for v4.2 domain):
ncks -O -d lat,2114,2601 -d lon,2242,3419 weights_zdfiwm_eORCA12_bilin.nc /dssgfs01/working/atb299/NEMO_cfgs/RAPID_Evolution/weights_zdfiwm_eORCA12_bilin_R12.nc`
In /dssgfs01/working/acc/FORCING/JRA:
ncks -O -d lat,2114,2601 -d lon,2242,3419 weights_jra_eORCA12_bilin.nc /dssgfs01/working/atb299/NEMO_cfgs/RAPID_Evolution/weights_jra_eORCA12_bilin_R12.nc
ncks -O -d lat,2114,2601 -d lon,2242,3419 weights_jra_eORCA12_bicubic.nc /dssgfs01/working/atb299/NEMO_cfgs/RAPID_Evolution/weights_jra_eORCA12_bicubic_R12.nc
Building Weights (temporary - to be cleaned)
Currently working here for regular to ORCA:
/dssgfs01/scratch/atb299/RAPID-Evolution/20240111/RAPID-Evolution/nemo/tools/WEIGHTS/RAPID12
/dssgfs01/scratch/atb299/RAPID-Evolution/20240111/RAPID-Evolution/nemo/tools/WEIGHTS/RAPID36
and here for ORCA to ORCA:
/dssgfs01/scratch/atb299/RAPID-Evolution/20240202/RAPID-Evolution/nemo/tools/WEIGHTS/RAPID36
Mapping ORCA to ORCA requires some code mods. At some point these ought to be coded such that it is possible to specify the type of weights at runtime, rather than relying on the user to build two separate executables.
For now it is sufficient to check that the domain_cfg links in the folders are correct, remove the existing WEIGHTS
folders (to avoid no_clobber issues) and then:
sbatch build_weights.slurm
I then rename the files:
rename .nc _R12.nc *nc
rename .nc _R12.nc JRA/*nc
rename JRA jra JRA/*nc
rename bilinear bilin *nc
before moving them to the RAPID_Evolution
folder.
Files in /dssgfs01/working/atb299/NEMO_cfgs/RAPID_Evolution/
Testing of bathymetries
Currently working here:
/work/n01/n01/atb299/RAPID-Evo/20240413/RAPID-Evolution/nemo/cfgs/AGRIF_QCO/eORCA025-RAPID12-RAPID36