Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a script used for creating mesh files #54

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions utilities/mesh_file/mesh.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/sh
#
# Create mesh files for cfsr and gefs data
#
# Input grid files are cfsr.SCRIP.nc and gefs.SCRIP.nc.
# Output mesh files are cfsr_mesh.nc and gefs_mesh.nc.
#
module use /scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/modulefiles/stack
module load hpc/1.1.0
module load hpc-intel/18.0.5.274
module load hpc-impi/2018.0.4
module load netcdf/4.7.4
module load esmf/8_2_0
module load nco
ln -s /scratch1/NCEPDEV/nems/emc.nemspara/RT/DATM-MOM6-CICE5/DATM/cfsr.SCRIP.nc .
ln -s /scratch1/NCEPDEV/nems/emc.nemspara/RT/DATM-MOM6-CICE5/DATM/gefs.SCRIP.nc .
ln -s /scratch1/NCEPDEV/nems/emc.nemspara/RT/DATM-MOM6-CICE5/DATM/gfs.SCRIP.nc .
###################################################################################
#
# for nems_datm model
# grid_imask=0 over ocean points
# grid_imask=1 over land points
#
###################################################################################
#
# for cdeps_datm model
# grid_imask=1 over ocean points
# grid_imask=0 over land points
#
ncap2 -h -s "grid_imask=1-grid_imask" cfsr.SCRIP.nc cfsr_mask.nc
ncap2 -h -s "grid_imask=1-grid_imask" gefs.SCRIP.nc gefs_mask.nc
#
###################################################################################
ESMF_Scrip2Unstruct cfsr_mask.nc cfsr_mesh.nc 0 ESMF
mv PET0.ESMF_LogFile PET0.ESMF_LogFile_CFSR
#
ESMF_Scrip2Unstruct gefs_mask.nc gefs_mesh.nc 0 ESMF
mv PET0.ESMF_LogFile PET0.ESMF_LogFile_GEFS
#
ESMF_Scrip2Unstruct gfs.SCRIP.nc gfs_mesh.nc 0 ESMF
mv PET0.ESMF_LogFile PET0.ESMF_LogFile_GFS