Skip to content

Commit

Permalink
Change path to orog files and simplify ex-scripts (ufs-community#113)
Browse files Browse the repository at this point in the history
* change path to orog

* remove module load from exscript

* remove unnecessary parcing

* clean up ctest script

* change path to cartopy natural earth
  • Loading branch information
chan-hoo authored Jun 12, 2024
1 parent 17f87c4 commit b9cd30a
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 36 deletions.
4 changes: 2 additions & 2 deletions parm/templates/template.jedi2ufs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
! FV3 resolution and path to oro files for restart/perturbation conversion

tile_size = XXRES
tile_path = "XXTPATH"
tile_path = "FIXlandda/orog_files/"
tile_fstub = "XXTSTUB"

!------------------- only restart conversion -------------------
Expand All @@ -18,7 +18,7 @@
restart_date = "XXYYYY-XXMM-XXDD XXHH:00:00"

! Path for static file
static_filename = "FIXlandda/forcing/MODEL_FORCING/static/ufs-land_CXXRES_static_fields.nc"
static_filename = "FIXlandda/static/ufs-land_CXXRES_static_fields.nc"

! Location of vector restart file (vector2tile direction)

Expand Down
4 changes: 2 additions & 2 deletions parm/templates/template.tile2vector
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
! FV3 resolution and path to oro files for restart/perturbation conversion

tile_size = XXRES
tile_path = "XXTPATH"
tile_path = "FIXlandda/orog_files/"
tile_fstub = "XXTSTUB"

!------------------- only restart conversion -------------------
Expand All @@ -18,7 +18,7 @@
restart_date = "XXYYYY-XXMM-XXDD XXHH:00:00"

! Path for static file
static_filename = "FIXlandda/forcing/MODEL_FORCING/static/ufs-land_CXXRES_static_fields.nc"
static_filename = "FIXlandda/static/ufs-land_CXXRES_static_fields.nc"

! Location of vector restart file (vector2tile direction)

Expand Down
2 changes: 1 addition & 1 deletion parm/templates/template.ufs-noahMP.namelist.era5
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
&run_setup

static_file = "/FIXlandda/forcing/era5/static/ufs-land_C96_static_fields.nc"
static_file = "/FIXlandda/static/ufs-land_C96_static_fields.nc"
init_file = "/FIXlandda/forcing/era5/init/ufs-land_C96_init_2010-12-31_23-00-00.nc"
forcing_dir = "/FIXlandda/forcing/era5/datm/C96/"

Expand Down
4 changes: 2 additions & 2 deletions parm/templates/template.ufs2jedi
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
! FV3 resolution and path to oro files for restart/perturbation conversion

tile_size = XXRES
tile_path = "XXTPATH"
tile_path = "FIXlandda/orog_files/"
tile_fstub = "XXTSTUB"

!------------------- only restart conversion -------------------
Expand All @@ -18,7 +18,7 @@
restart_date = "XXYYYY-XXMM-XXDD XXHH:00:00"

! Path for static file
static_filename = "FIXlandda/forcing/MODEL_FORCING/static/ufs-land_CXXRES_static_fields.nc"
static_filename = "FIXlandda/static/ufs-land_CXXRES_static_fields.nc"

! Location of vector restart file (vector2tile direction)

Expand Down
4 changes: 2 additions & 2 deletions parm/templates/template.vector2tile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
! FV3 resolution and path to oro files for restart/perturbation conversion

tile_size = XXRES
tile_path = "XXTPATH"
tile_path = "FIXlandda/orog_files/"
tile_fstub = "XXTSTUB"

!------------------- only restart conversion -------------------
Expand All @@ -18,7 +18,7 @@
restart_date = "XXYYYY-XXMM-XXDD XXHH:00:00"

! Path for static file
static_filename = "FIXlandda/forcing/MODEL_FORCING/static/ufs-land_CXXRES_static_fields.nc"
static_filename = "FIXlandda/static/ufs-land_CXXRES_static_fields.nc"

! Location of vector restart file (vector2tile direction)

Expand Down
2 changes: 1 addition & 1 deletion scripts/exlandda_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -xue

TPATH=${FIXlandda}/forcing/${ATMOS_FORC}/orog_files/
TPATH=${FIXlandda}/orog_files/
YYYY=${PDY:0:4}
MM=${PDY:4:2}
DD=${PDY:6:2}
Expand Down
2 changes: 1 addition & 1 deletion scripts/exlandda_forecast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
set -xue

MACHINE_ID=${MACHINE}
TPATH=${FIXlandda}/forcing/${ATMOS_FORC}/orog_files/

YYYY=${PDY:0:4}
MM=${PDY:4:2}
DD=${PDY:6:2}
Expand Down
15 changes: 1 addition & 14 deletions scripts/exlandda_post_anal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -xue
# copy restarts to workdir, convert to UFS tile for DA (all members)

MACHINE_ID=${MACHINE}
TPATH=${FIXlandda}/forcing/${ATMOS_FORC}/orog_files/

YYYY=${PDY:0:4}
MM=${PDY:4:2}
DD=${PDY:6:2}
Expand All @@ -20,15 +20,6 @@ FREQ=$((${FCSTHR}*3600))
RDD=$((${FCSTHR}/24))
RHH=$((${FCSTHR}%24))

# load modulefiles
BUILD_VERSION_FILE="${HOMElandda}/versions/build.ver_${MACHINE}"
if [ -e ${BUILD_VERSION_FILE} ]; then
. ${BUILD_VERSION_FILE}
fi
mkdir -p modulefiles
cp ${HOMElandda}/modulefiles/build_${MACHINE}_intel.lua $DATA/modulefiles/modules.landda.lua
module use modulefiles; module load modules.landda

MPIEXEC=`which mpiexec`

FILEDATE=${YYYY}${MM}${DD}.${HH}0000
Expand All @@ -51,10 +42,8 @@ if [[ ${ATMOS_FORC} == "era5" ]]; then
sed -i -e "s/XXMM/${MM}/g" tile2vector.namelist
sed -i -e "s/XXDD/${DD}/g" tile2vector.namelist
sed -i -e "s/XXHH/${HH}/g" tile2vector.namelist
sed -i -e "s/MODEL_FORCING/${ATMOS_FORC}/g" tile2vector.namelist
sed -i -e "s/XXRES/${RES}/g" tile2vector.namelist
sed -i -e "s/XXTSTUB/${TSTUB}/g" tile2vector.namelist
sed -i -e "s#XXTPATH#${TPATH}#g" tile2vector.namelist

export pgm="vector2tile_converter.exe"
. prep_step
Expand Down Expand Up @@ -118,10 +107,8 @@ elif [[ ${ATMOS_FORC} == "gswp3" ]]; then
sed -i -e "s/XXMM/${MM}/g" jedi2ufs.namelist
sed -i -e "s/XXDD/${DD}/g" jedi2ufs.namelist
sed -i -e "s/XXHH/${HH}/g" jedi2ufs.namelist
sed -i -e "s/MODEL_FORCING/${ATMOS_FORC}/g" jedi2ufs.namelist
sed -i -e "s/XXRES/${RES}/g" jedi2ufs.namelist
sed -i -e "s/XXTSTUB/${TSTUB}/g" jedi2ufs.namelist
sed -i -e "s#XXTPATH#${TPATH}#g" jedi2ufs.namelist

export pgm="tile2tile_converter.exe"
. prep_step
Expand Down
5 changes: 0 additions & 5 deletions scripts/exlandda_pre_anal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

set -xue

TPATH=${FIXlandda}/forcing/${ATMOS_FORC}/orog_files/
YYYY=${PDY:0:4}
MM=${PDY:4:2}
DD=${PDY:6:2}
Expand Down Expand Up @@ -40,10 +39,8 @@ if [[ $ATMOS_FORC == "era5" ]]; then
sed -i -e "s/XXDD/${DD}/g" vector2tile.namelist
sed -i -e "s/XXHH/${HH}/g" vector2tile.namelist
sed -i -e "s/XXHH/${HH}/g" vector2tile.namelist
sed -i -e "s/MODEL_FORCING/${ATMOS_FORC}/g" vector2tile.namelist
sed -i -e "s/XXRES/${RES}/g" vector2tile.namelist
sed -i -e "s/XXTSTUB/${TSTUB}/g" vector2tile.namelist
sed -i -e "s#XXTPATH#${TPATH}#g" vector2tile.namelist

# submit vec2tile
echo '************************************************'
Expand Down Expand Up @@ -89,10 +86,8 @@ elif [[ $ATMOS_FORC == "gswp3" ]]; then
sed -i -e "s/XXDD/${DD}/g" ufs2jedi.namelist
sed -i -e "s/XXHH/${HH}/g" ufs2jedi.namelist
sed -i -e "s/XXHH/${HH}/g" ufs2jedi.namelist
sed -i -e "s/MODEL_FORCING/${ATMOS_FORC}/g" ufs2jedi.namelist
sed -i -e "s/XXRES/${RES}/g" ufs2jedi.namelist
sed -i -e "s/XXTSTUB/${TSTUB}/g" ufs2jedi.namelist
sed -i -e "s#XXTPATH#${TPATH}#g" ufs2jedi.namelist

# submit tile2tile
export pgm="tile2tile_converter.exe"
Expand Down
2 changes: 1 addition & 1 deletion sorc/test/runtime_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export PYTHON_EXEC=${PYTHON_EXEC:-`which python`}
# configurations
export RES=96
export atmos_forc=era5
export TPATH="$FIXlandda/forcing/${atmos_forc}/orog_files/"
export TPATH="$FIXlandda/orog_files/"
export TSTUB="oro_C${RES}.mx100"
export GFSv17=NO
export OBS_TYPES=("GHCN")
Expand Down
1 change: 0 additions & 1 deletion sorc/test/test_vector2tile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ sed -i -e "s/XXYYYY/${YY}/g" vector2tile.namelist
sed -i -e "s/XXMM/${MM}/g" vector2tile.namelist
sed -i -e "s/XXDD/${DD}/g" vector2tile.namelist
sed -i -e "s/XXHH/${HH}/g" vector2tile.namelist
sed -i -e "s/MODEL_FORCING/${atmos_forc}/g" vector2tile.namelist
sed -i -e "s/XXRES/${RES}/g" vector2tile.namelist
sed -i -e "s#XXTPATH#${TPATH}#g" vector2tile.namelist
sed -i -e "s/XXTSTUB/${TSTUB}/g" vector2tile.namelist
Expand Down
2 changes: 1 addition & 1 deletion sorc/test/testinput/template.vector2tile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
restart_date = "XXYYYY-XXMM-XXDD XXHH:00:00"

! Path for static file
static_filename = "FIXlandda/forcing/MODEL_FORCING/static/ufs-land_CXXRES_static_fields.nc"
static_filename = "FIXlandda/static/ufs-land_CXXRES_static_fields.nc"

! Location of vector restart file (vector2tile direction)

Expand Down
6 changes: 3 additions & 3 deletions ush/hofx_analysis_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def get_obs_stats(fdir, plottype):
def plot_scatter():
print("===== PLOT: SCATTER =====")
if yaml_data['machine']=='hera':
cartopy.config['data_dir']='/scratch2/NCEPDEV/fv3-cam/Chan-hoo.Jeon/tools/NaturalEarth'
elif yaml_data['machine']=='orion':
cartopy.config['data_dir']='/home/chjeon/tools/NaturalEarth'
cartopy.config['data_dir']='/scratch2/NAGAPE/epic/UFS_Land-DA_Dev/inputs/NaturalEarth'
elif yaml_data['machine']=='orion' or yaml_data['machine']=='hercules':
cartopy.config['data_dir']='/work/noaa/epic/UFS_Land-DA_Dev/inputs/NaturalEarth'

field_mean=float("{:.2f}".format(np.mean(np.absolute(field))))
field_std=float("{:.2f}".format(np.std(np.absolute(field))))
Expand Down

0 comments on commit b9cd30a

Please sign in to comment.