forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request NOAA-EMC#26 from zhanglikate/feature/chem
Feature/chem
- Loading branch information
Showing
286 changed files
with
24,110 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
#!/bin/ksh -x | ||
|
||
############################################################### | ||
## Abstract: | ||
## Calculate increment of Met. fields for FV3-CHEM | ||
## RUN_ENVIR : runtime environment (emc | nco) | ||
## HOMEgfs : /full/path/to/workflow | ||
## EXPDIR : /full/path/to/config/files | ||
## CDATE : current date (YYYYMMDDHH) | ||
## CDUMP : cycle name (gdas / gfs) | ||
## PDY : current date (YYYYMMDD) | ||
## cyc : current cycle (HH) | ||
############################################################### | ||
# Source FV3GFS workflow modules | ||
. $HOMEgfs/ush/load_fv3gfs_modules.sh | ||
status=$? | ||
[[ $status -ne 0 ]] && exit $status | ||
|
||
############################################################### | ||
# Source relevant configs | ||
configs="base calcinc" | ||
for config in $configs; do | ||
. $EXPDIR/config.${config} | ||
status=$? | ||
[[ $status -ne 0 ]] && exit $status | ||
done | ||
|
||
# Source machine runtime environment | ||
. $BASE_ENV/${machine}.env calcinc | ||
status=$? | ||
[[ $status -ne 0 ]] && exit $status | ||
############################################################### | ||
CALCINCEXEC=${CALCINCEXEC:-$HOMEgfs/exec/calc_increment_ens.x} | ||
NTHREADS_CALCINC=${NTHREADS_CALCINC:-1} | ||
ncmd=${ncmd:-1} | ||
imp_physics=${imp_physics:-99} | ||
INCREMENTS_TO_ZERO=${INCREMENTS_TO_ZERO:-"'NONE'"} | ||
DO_CALC_INCREMENT=${DO_CALC_INCREMENT:-"YES"} | ||
export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} | ||
|
||
TMPDAY=`$NDATE -24 $PDY$cyc` | ||
HISDAY=`echo $TMPDAY | cut -c1-8` | ||
|
||
if [ $DO_CALC_INCREMENT = "YES" ]; then | ||
|
||
export DATA="$RUNDIR/$CDATE/$CDUMP" | ||
|
||
[[ ! -d $DATA ]] && mkdir -p $DATA | ||
|
||
cd $DATA | ||
mkdir -p calcinc | ||
cd calcinc | ||
|
||
# $NLN sigf06 atmges_mem001 ; $NLN siganl atmanl_mem001 ; | ||
|
||
export OMP_NUM_THREADS=$NTHREADS_CALCINC | ||
$NCP $CALCINCEXEC . | ||
$NLN $OUTDIR/$CDUMP.$HISDAY/00/$CDUMP.t00z.atmf024.nemsio atmges_mem001 | ||
$NLN ../regrid/atmanl.$PDY$cyc atmanl_mem001 | ||
$NLN atminc.nc atminc_mem001 | ||
rm calc_increment.nml | ||
cat > calc_increment.nml << EOF | ||
&setup | ||
datapath = './' | ||
analysis_filename = 'atmanl' | ||
firstguess_filename = 'atmges' | ||
increment_filename = 'atminc' | ||
debug = .false. | ||
nens = $ncmd | ||
imp_physics = $imp_physics | ||
/ | ||
&zeroinc | ||
incvars_to_zero = $INCREMENTS_TO_ZERO | ||
/ | ||
EOF | ||
cat calc_increment.nml | ||
|
||
APRUN=$(eval echo $APRUN_CALCINC) | ||
$APRUN $(basename $CALCINCEXEC) | ||
rc=$? | ||
|
||
export ERR=$rc | ||
export err=$ERR | ||
$ERRSCRIPT || exit 3 | ||
fi | ||
|
||
############################################################### | ||
|
||
############################################################### | ||
# Exit cleanly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
#!/bin/ksh -x | ||
|
||
############################################################### | ||
## Abstract: | ||
## Calculate increment of Met. fields for FV3-CHEM | ||
## RUN_ENVIR : runtime environment (emc | nco) | ||
## HOMEgfs : /full/path/to/workflow | ||
## EXPDIR : /full/path/to/config/files | ||
## CDATE : current date (YYYYMMDDHH) | ||
## CDUMP : cycle name (gdas / gfs) | ||
## PDY : current date (YYYYMMDD) | ||
## cyc : current cycle (HH) | ||
############################################################### | ||
# Source FV3GFS workflow modules | ||
. $HOMEgfs/ush/load_fv3gfs16_modules.sh | ||
status=$? | ||
[[ $status -ne 0 ]] && exit $status | ||
|
||
############################################################### | ||
# Source relevant configs | ||
configs="base calcinc" | ||
for config in $configs; do | ||
. $EXPDIR/config.${config} | ||
status=$? | ||
[[ $status -ne 0 ]] && exit $status | ||
done | ||
|
||
# Source machine runtime environment | ||
. $BASE_ENV/${machine}.env calcinc | ||
status=$? | ||
[[ $status -ne 0 ]] && exit $status | ||
############################################################### | ||
#CALCINCEXEC=${CALCINCEXEC:-$HOMEgfs/exec/calc_increment_ens_gsdchem.x} | ||
CALCINCEXEC=${CALCINCEXEC:-$HOMEgfs/exec/calc_increment_ens_ncio.x} | ||
NTHREADS_CALCINC=${NTHREADS_CALCINC:-1} | ||
ncmd=${ncmd:-1} | ||
imp_physics=${imp_physics:-99} | ||
INCREMENTS_TO_ZERO=${INCREMENTS_TO_ZERO:-"'NONE'"} | ||
DO_CALC_INCREMENT=${DO_CALC_INCREMENT:-"YES"} | ||
export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} | ||
|
||
TMPDAY=`$NDATE -24 $PDY$cyc` | ||
HISDAY=`echo $TMPDAY | cut -c1-8` | ||
|
||
#convert nemsio to netcdf | ||
#$EXECgfs/nemsioatm2nc $OUTDIR/$CDUMP.$HISDAY/00/$CDUMP.t00z.atmf024.nemsio $CDUMP.t00z.atmf024.nc | ||
|
||
if [ $DO_CALC_INCREMENT = "YES" ]; then | ||
|
||
cd $DATA | ||
mkdir -p calcinc | ||
cd calcinc | ||
|
||
#convert nemsio to netcdf | ||
$EXECgfs/nemsioatm2nc $OUTDIR/$CDUMP.$HISDAY/00/$CDUMP.t00z.atmf024.nemsio $CDUMP.t00z.atmf024.nc | ||
# $NLN sigf06 atmges_mem001 ; $NLN siganl atmanl_mem001 ; | ||
|
||
export OMP_NUM_THREADS=$NTHREADS_CALCINC | ||
$NCP $CALCINCEXEC . | ||
# $NLN $OUTDIR/$CDUMP.$HISDAY/00/$CDUMP.t00z.atmf024.nemsio atmges_mem001 | ||
$NLN $CDUMP.t00z.atmf024.nc atmges_mem001 | ||
$NLN ../regrid/atmanl.$PDY$cyc.nc atmanl_mem001 | ||
$NLN atminc.nc atminc_mem001 | ||
rm calc_increment.nml | ||
cat > calc_increment.nml << EOF | ||
&setup | ||
datapath = './' | ||
analysis_filename = 'atmanl' | ||
firstguess_filename = 'atmges' | ||
increment_filename = 'atminc' | ||
debug = .false. | ||
nens = $ncmd | ||
imp_physics = $imp_physics | ||
/ | ||
&zeroinc | ||
incvars_to_zero = $INCREMENTS_TO_ZERO | ||
/ | ||
EOF | ||
cat calc_increment.nml | ||
|
||
APRUN=$(eval echo $APRUN_CALCINC) | ||
$APRUN $(basename $CALCINCEXEC) | ||
rc=$? | ||
|
||
export ERR=$rc | ||
export err=$ERR | ||
$ERRSCRIPT || exit 3 | ||
fi | ||
|
||
############################################################### | ||
|
||
############################################################### | ||
# Exit cleanly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.