Skip to content

Commit

Permalink
Merge pull request #16 from NOC-MSM/master
Browse files Browse the repository at this point in the history
NEMO-RELOC --> SWOT
  • Loading branch information
jpolton authored May 27, 2021
2 parents 92a8d01 + aceb4c8 commit a786036
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 96 deletions.
20 changes: 8 additions & 12 deletions SCRIPTS/make_bathymetry_from_gebco.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,41 +53,36 @@
# If necessary, edit namelist to point to correct input file and variable names
cd $DOMAIN

# Link in the new coordinates file
ln -s $TDIR/NESTING/1_coordinates_AMM15.nc coordinates.nc

# Execute first SCRIP process::
$TDIR/WEIGHTS/scripgrid.exe namelist_reshape_bilin_gebco

#:'
#
# Output files::
#
# remap_nemo_grid_gebco.nc
# remap_data_grid_gebco.nc
#'
#::

#Execute second SCRIP process:
$TDIR/WEIGHTS/scrip.exe namelist_reshape_bilin_gebco

#:'
#
# Output files::
#
# data_nemo_bilin_gebco.nc
#'
#::


# Execute third SCRIP process:
$TDIR/WEIGHTS/scripinterp.exe namelist_reshape_bilin_gebco

#:'
#
# Output files::
#
# bathy_meter.nc
#
# Finally, load ``nco`` tools to tidy some grid scale issues
#'
#::

#
# Finally make minor modifications to the bathymetry file
#
# # load nco modules (this was done locally)
# module load nco
Expand All @@ -106,4 +101,5 @@
# # E.g. ncap2 -s 'Bathymetry(0,0)=0' bathy_meter_10m.nc bathy_meter_10m.nc -O



cd $WORK
87 changes: 3 additions & 84 deletions SCRIPTS/make_coordinates_from_parent_SEAsia.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,101 +10,22 @@ Make a netCDF coordinates file holds that holds the horizontal grid coordinate
position and spacings information. This is used to construct the 3D version:
the domain_cfg.nc file.
This script generates a coordinates.nc file using the gebco bathymetry data.
This script generates a coordinates.nc file using a parent NEMO coordinates file.
'





Hmm try and jump straight to DOMAINcfg with only lat and lon points


Extract from the parent bathymetry the size, start lat and lon, and resolution::


y = 1363
x = 2410

::

vi namelist_cfg

jpidta = 2410 ! 1st lateral dimension ( >= jpi )
jpjdta = 1363 ! 2nd " " ( >= jpj )
...
jpiglo = 2410 ! 1st dimension of global domain --> i =jpidta
jpjglo = 1363 ! 2nd - - --> j =jpjdta


!-----------------------------------------------------------------------
&namdom ! space and time domain (bathymetry, mesh, timestep)
!-----------------------------------------------------------------------
jphgr_msh = 1 ! type of horizontal mesh
ppglam0 = -1.6638888888888899 ! longitude of first raw and column T-point (jphgr_msh = 1)
ppgphi0 = 50.53833333333690803 ! latitude of first raw and column T-point (jphgr_msh = 1)
ppe1_deg = 0.0002777777778 ! zonal grid-spacing (degrees)
ppe2_deg = 0.0002777777778 ! meridional grid-spacing (degrees)
ppdzmin = 999999. ! Minimum vertical spacing
pphmax = 999999. ! Maximum depth
ldbletanh = .FALSE. ! Use/do not use double tanf function for vertical coordinates
ppa2 = 999999. ! Double tanh function parameters
ppkth2 = 999999. !
ppacr2 = 999999. !
/



This seems to work, in populating e1 and e2 fields.

NExt steps:
Do rigourously.


Then build into a coordinate.nc file::

$archer
module load nco

# copy the desired variables
ncks -O -C -a -v nav_lon,nav_lat,glamt,glamu,glamv,glamf,gphit,gphiu,gphiv,gphif,e1t,e1u,e1v,e1f,e2t,e2u,e2v,e2f,ff_f,ff_t domain_cfg.nc coordinates_Solent_R3600.nc


This creates a new coordinates file with contents, which is now copied to
INPUTS::

cp coordinates_Solent_R3600.nc $INPUTS/coordinates.nc



Now we need to generate a bathymetry on this new grid.





#::



cd $TDIR/NESTING

#load modules
module unload nco cray-netcdf cray-hdf5
module swap PrgEnv-cray PrgEnv-intel
module load cray-netcdf-hdf5parallel
module load cray-hdf5-parallel
module -s restore /work/n01/shared/acc/n01_modules/ucx_env

# subdomain of ORCA global
# you can download the ORCA R12 coordinates
wget http://gws-access.jasmin.ac.uk/public/nemo/runs/ORCA0083-N06/domain/coordinates.nc -O $TDIR/NESTING/coordinates_ORCA_R12.nc

# or in ARCHER you can take it from my directory
# cp /work/n01/n01/jelt/EXTRA_TOOLS/GRIDS/coordinates_ORCA_R12.nc $TDIR/NESTING/.

# Get the namelist file from the cloned NEMO-RELOC repository
cp $GITCLONE/DOMAIN/namelist.input $TDIR/NESTING/
cp $DOMAIN/namelist.input $TDIR/NESTING/

:'
Expand All @@ -115,8 +36,6 @@ coordinates. rho=rhot=7 with increase the resolution by a factor of 7.

#::

cd $TDIR/NESTING/

# Generate the new coordinates file with the namelist.input settings
./agrif_create_coordinates.exe

Expand Down

0 comments on commit a786036

Please sign in to comment.