Skip to content

Commit

Permalink
changed the output file names to follow /scratch1/NCEPDEV/global/glop…
Browse files Browse the repository at this point in the history
…ara/fix/orog/20230615/
  • Loading branch information
sanatcumar committed Nov 8, 2023
1 parent eadcd71 commit e2fbc56
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
14 changes: 7 additions & 7 deletions driver_scripts/driver_grid.hera.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#SBATCH --open-mode=truncate
#SBATCH -o log.fv3_grid_driver
#SBATCH -e log.fv3_grid_driver
#SBATCH --nodes=1 --ntasks-per-node=24
#SBATCH --nodes=6 --ntasks-per-node=12
#SBATCH --partition=bigmem
#SBATCH -q debug
#SBATCH -t 00:30:00
#SBATCH -q batch
#SBATCH -t 04:30:00

#-----------------------------------------------------------------------
# Driver script to create a cubic-sphere based model grid on Hera.
Expand Down Expand Up @@ -80,7 +80,7 @@ export gtype=uniform # 'uniform', 'stretch', 'nest',
export make_gsl_orog=false # When 'true' will output 'oro' files for
# the GSL orographic drag suite.

export vegsoilt_frac='.false.' # When .false., output dominant soil and
export vegsoilt_frac='.true.' # When .false., output dominant soil and
# vegetation type category. When .true.,
# output fraction of each category and
# the dominant category. A Fortran logical,
Expand Down Expand Up @@ -111,11 +111,11 @@ export soil_type_src="bnu.v3.30s" # Soil type data.
export lake_data_srce=MODISP_GLDBV3

if [ $gtype = uniform ]; then
export res=96
# export res=96
export add_lake=true # Add lake frac and depth to orography data.
export lake_cutoff=0.50 # return 0 if lake_frac < lake_cutoff & add_lake=T
export binary_lake=1 # return 1 if lake_frac >= lake_cutoff & add_lake=T
export ocn=${ocn:-"025"} # use one of "025", "050", "100", "500". Cannot be empty
# export ocn=${ocn:-"025"} # use one of "025", "050", "100", "500". Cannot be empty
elif [ $gtype = stretch ]; then
export res=96
export stretch_fac=1.5 # Stretching factor for the grid
Expand Down Expand Up @@ -162,7 +162,7 @@ fi

export home_dir=$SLURM_SUBMIT_DIR/..
export TEMP_DIR=/scratch2/NCEPDEV/stmp1/$LOGNAME/fv3_grid.$gtype
export out_dir=/scratch2/NCEPDEV/stmp1/$LOGNAME/my_grids/
export out_dir=/scratch2/NCEPDEV/stmp1/$LOGNAME/my_grids_611/vegfrac/
export ocean_mask_dir=/scratch1/NCEPDEV/stmp4/Sanath.Kumar/ocean_mask/CPLD_GRIDGEN/

#-----------------------------------------------------------------------
Expand Down
11 changes: 8 additions & 3 deletions ush/fv3gfs_driver_grid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ if [ $gtype = uniform ] || [ $gtype = stretch ] || [ $gtype = nest ]; then

tile=1
while [ $tile -le $ntiles ]; do
cp $filter_dir/oro.C${res}.tile${tile}.nc $out_dir/C${res}_oro_data.tile${tile}.nc
cp $grid_dir/C${res}_grid.tile${tile}.nc $out_dir/C${res}_grid.tile${tile}.nc
cp $filter_dir/oro.C${res}.tile${tile}.nc $out_dir/oro_C${res}.mx${ocn}.tile${tile}.nc
cp $grid_dir/C${res}_grid.tile${tile}.nc $out_dir/C${res}.mx${ocn}_grid.tile${tile}.nc
if [ $make_gsl_orog = true ]; then
cp $orog_dir/C${res}.oro.datadata_*.tile${tile}*.nc $out_dir/ # gsl drag suite oro_data files
fi
Expand Down Expand Up @@ -504,7 +504,7 @@ fi
#------------------------------------------------------------------------------------

export WORK_DIR=$TEMP_DIR/sfcfields
export SAVE_DIR=$out_dir/fix_sfc
export SAVE_DIR=$out_dir/sfc
export BASE_DIR=$home_dir
export FIX_FV3=$out_dir
export input_sfc_climo_dir=$home_dir/fix/sfc_climo
Expand All @@ -513,6 +513,7 @@ if [ $gtype = regional_gfdl ] || [ $gtype = regional_esg ]; then
export HALO=$halop1
ln -fs $out_dir/C${res}_grid.tile${tile}.halo${HALO}.nc $out_dir/C${res}_grid.tile${tile}.nc
ln -fs $out_dir/C${res}_oro_data.tile${tile}.halo${HALO}.nc $out_dir/C${res}_oro_data.tile${tile}.nc

export GRIDTYPE=regional
elif [ $gtype = nest ]; then
export mosaic_file=$out_dir/C${res}_coarse_mosaic.nc
Expand Down Expand Up @@ -565,6 +566,9 @@ The following parameters were used
vegsoilt_frac=$vegsoilt_frac
veg_type=$veg_type_src
soil_type=$soil_type_src
add_lake=$add_lake
binary_lake=$binary_lake
lake_cutoff=$lake_cutoff
EOF
elif [ $gtype = nest ] || [ $gtype = regional_gfdl ]; then

Expand All @@ -583,6 +587,7 @@ The following parameters were used
soil_type=$soil_type_src
add_lake=$add_lake
lake_cutoff=$lake_cutoff
binary_lake=$binary_lake
stretch_fac=$stretch_fac # Stretching factor for the grid
target_lon=$target_lon # Center longitude of the highest resolution tile
target_lat=$target_lat # Center latitude of the highest resolution tile
Expand Down
7 changes: 5 additions & 2 deletions ush/sfc_climo_gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ cd $WORK_DIR
if [[ $GRIDTYPE == "nest" ]] || [[ $GRIDTYPE == "regional" ]]; then
the_orog_files='"C'${res}'_oro_data.tile7.nc"'
else
the_orog_files='"C'${res}'_oro_data.tile1.nc","C'${res}'_oro_data.tile2.nc","C'${res}'_oro_data.tile3.nc","C'${res}'_oro_data.tile4.nc","C'${res}'_oro_data.tile5.nc","C'${res}'_oro_data.tile6.nc"'
the_orog_files='"oro_C'${res}.mx${ocn}'.tile1.nc","oro_C'${res}.mx${ocn}'.tile1.nc","oro_C'${res}.mx${ocn}'.tile1.nc","oro_C'${res}.mx${ocn}'.tile1.nc","oro_C'${res}.mx${ocn}'.tile1.nc","oro_C'${res}.mx${ocn}'.tile1.nc"'
fi
#the_orog_files='"C'${res}'_oro_data.tile1.nc","C'${res}'_oro_data.tile2.nc","C'${res}'_oro_data.tile3.nc","C'${res}'_oro_data.tile4.nc","C'${res}'_oro_data.tile5.nc","C'${res}'_oro_data.tile6.nc"'

cat << EOF > ./fort.41
&config
input_facsf_file="${input_sfc_climo_dir}/facsf.1.0.nc"
Expand All @@ -92,6 +94,7 @@ fract_vegsoil_type=${vegsoilt_frac}
/
EOF


APRUN_SFC=${APRUN_SFC:-"aprun -j 1 -n 6 -N 6"}
$APRUN_SFC $exec_dir/sfc_climo_gen

Expand All @@ -102,7 +105,7 @@ if [[ $rc == 0 ]]; then
for files in *.nc
do
if [[ -f $files ]]; then
mv $files ${SAVE_DIR}/C${res}.${files}
mv $files ${SAVE_DIR}/C${res}.mx${ocn}.${files}
fi
done
else
Expand Down

0 comments on commit e2fbc56

Please sign in to comment.