Skip to content

Commit

Permalink
GitHub Issue NOAA-EMC#295. GSI scripts and fix file change to assimil…
Browse files Browse the repository at this point in the history
…ate metop-c AVHRR radiance.
  • Loading branch information
XuLi-NOAA committed Mar 2, 2022
1 parent 97e5144 commit 888fdf9
Show file tree
Hide file tree
Showing 41 changed files with 462 additions and 535 deletions.
6 changes: 2 additions & 4 deletions scripts/exgdas_enkf_sfc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,9 @@ else
fi

if [ $DONST = "YES" ]; then
export NST_ANL=".true."
export GSI_FILE=${GSI_FILE:-$COMIN/${APREFIX}dtfanl.nc}
export NST_FILE=${NST_FILE:-$COMIN/${APREFIX}dtfanl.nc}
else
export NST_ANL=".false."
export GSI_FILE="NULL"
export NST_FILE="NULL"
fi

export APRUNCY=${APRUN_CYCLE:-$APRUN_ESFC}
Expand Down
7 changes: 3 additions & 4 deletions scripts/exglobal_atmos_analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@ OBS_INPUT::
avhambufr avhrr metop-a avhrr3_metop-a 0.0 4 0
avhpmbufr avhrr n18 avhrr3_n18 0.0 4 0
avhambufr avhrr metop-b avhrr3_metop-b 0.0 4 0
avhambufr avhrr metop-c avhrr3_metop-c 0.0 4 0
avhpmbufr avhrr n19 avhrr3_n19 0.0 4 0
amsr2bufr amsr2 gcom-w1 amsr2_gcom-w1 0.0 3 0
gmibufr gmi gpm gmi_gpm 0.0 3 0
Expand Down Expand Up @@ -1004,11 +1005,9 @@ if [ $DOGCYCLE = "YES" ]; then
fi

if [ $DONST = "YES" ]; then
export NST_ANL=".true."
export GSI_FILE=${GSI_FILE:-$COMOUT/${APREFIX}dtfanl.nc}
export NST_FILE=${NST_FILE:-$COMOUT/${APREFIX}dtfanl.nc}
else
export NST_ANL=".false."
export GSI_FILE="NULL"
export NST_FILE="NULL"
fi

if [ $DOIAU = "YES" ]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/exglobal_diag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ if [ $GENDIAG = "YES" ] ; then
diagtype[0]="conv conv_gps conv_ps conv_pw conv_q conv_sst conv_t conv_tcp conv_uv conv_spd"
diagtype[1]="pcp_ssmi_dmsp pcp_tmi_trmm"
diagtype[2]="sbuv2_n16 sbuv2_n17 sbuv2_n18 sbuv2_n19 gome_metop-a gome_metop-b omi_aura mls30_aura ompsnp_npp ompstc8_npp ompstc8_n20 ompsnp_n20 ompslp_npp gome_metop-c"
diagtype[3]="hirs2_n14 msu_n14 sndr_g08 sndr_g11 sndr_g12 sndr_g13 sndr_g08_prep sndr_g11_prep sndr_g12_prep sndr_g13_prep sndrd1_g11 sndrd2_g11 sndrd3_g11 sndrd4_g11 sndrd1_g12 sndrd2_g12 sndrd3_g12 sndrd4_g12 sndrd1_g13 sndrd2_g13 sndrd3_g13 sndrd4_g13 sndrd1_g14 sndrd2_g14 sndrd3_g14 sndrd4_g14 sndrd1_g15 sndrd2_g15 sndrd3_g15 sndrd4_g15 hirs3_n15 hirs3_n16 hirs3_n17 amsua_n15 amsua_n16 amsua_n17 amsub_n15 amsub_n16 amsub_n17 hsb_aqua airs_aqua amsua_aqua imgr_g08 imgr_g11 imgr_g12 imgr_g14 imgr_g15 ssmi_f13 ssmi_f15 hirs4_n18 hirs4_metop-a amsua_n18 amsua_metop-a mhs_n18 mhs_metop-a amsre_low_aqua amsre_mid_aqua amsre_hig_aqua ssmis_f16 ssmis_f17 ssmis_f18 ssmis_f19 ssmis_f20 iasi_metop-a hirs4_n19 amsua_n19 mhs_n19 seviri_m08 seviri_m09 seviri_m10 seviri_m11 cris_npp cris-fsr_npp cris-fsr_n20 atms_npp atms_n20 hirs4_metop-b amsua_metop-b mhs_metop-b iasi_metop-b avhrr_metop-b avhrr_n18 avhrr_n19 avhrr_metop-a amsr2_gcom-w1 gmi_gpm saphir_meghat ahi_himawari8 abi_g16 abi_g17 amsua_metop-c mhs_metop-c iasi_metop-c avhrr_metop-c"
diagtype[3]="hirs2_n14 msu_n14 sndr_g08 sndr_g11 sndr_g12 sndr_g13 sndr_g08_prep sndr_g11_prep sndr_g12_prep sndr_g13_prep sndrd1_g11 sndrd2_g11 sndrd3_g11 sndrd4_g11 sndrd1_g12 sndrd2_g12 sndrd3_g12 sndrd4_g12 sndrd1_g13 sndrd2_g13 sndrd3_g13 sndrd4_g13 sndrd1_g14 sndrd2_g14 sndrd3_g14 sndrd4_g14 sndrd1_g15 sndrd2_g15 sndrd3_g15 sndrd4_g15 hirs3_n15 hirs3_n16 hirs3_n17 amsua_n15 amsua_n16 amsua_n17 amsub_n15 amsub_n16 amsub_n17 hsb_aqua airs_aqua amsua_aqua imgr_g08 imgr_g11 imgr_g12 imgr_g14 imgr_g15 ssmi_f13 ssmi_f15 hirs4_n18 hirs4_metop-a amsua_n18 amsua_metop-a mhs_n18 mhs_metop-a amsre_low_aqua amsre_mid_aqua amsre_hig_aqua ssmis_f16 ssmis_f17 ssmis_f18 ssmis_f19 ssmis_f20 iasi_metop-a hirs4_n19 amsua_n19 mhs_n19 seviri_m08 seviri_m09 seviri_m10 seviri_m11 cris_npp cris-fsr_npp cris-fsr_n20 atms_npp atms_n20 hirs4_metop-b amsua_metop-b mhs_metop-b iasi_metop-b avhrr_metop-b avhrr_n18 avhrr_n19 avhrr_metop-a amsr2_gcom-w1 gmi_gpm saphir_meghat ahi_himawari8 abi_g16 abi_g17 amsua_metop-c mhs_metop-c iasi_metop-c avhrr_metop-c viirs-m_npp viirs-m_j1"

diaglist[0]=listcnv
diaglist[1]=listpcp
Expand Down
48 changes: 28 additions & 20 deletions util/Radiance_Monitor/RadMon_install.pl
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,30 @@
#
# This script makes sets all necessary configuration definitions
# and calls the makeall.sh script to build all the necessary
# executables. This script works for hera, wcoss, wcoss_c, and
# wcoss_d machines.
# executables.
#
#-------------------------------------------------------------------

use IO::File;
use File::Copy qw(move);

my $machine = `/usr/bin/perl get_hostname.pl`;
sub trim {
my $s = shift; $s =~ s/^\s+|\s+$//g;
return $s
};



my $machine = trim(`./get_machine.sh`);
my $my_machine="export MY_MACHINE=$machine";

if( $machine ne "wcoss_c" && $machine ne "hera" && $machine ne "wcoss_d" ) {
if( $machine ne "wcoss_c" && $machine ne "hera" && $machine ne "wcoss_d" && $machine ne "wcoss2" ) {
die( "ERROR --- Unrecognized machine hostname, $machine. Exiting now...\n" );
}
else {
print "machine = $machine\n";
}

#
# surge, hera, and wcoss are all little endian machines, and all run linux
#
my $little_endian = "export LITTLE_ENDIAN=\${LITTLE_ENDIAN:-0}";
my $my_os = "linux";


#
# Idenfity basedir location of package
#
Expand Down Expand Up @@ -62,6 +61,9 @@
elsif( $machine eq "wcoss_d" ){
$tankdir = "/gpfs/dell2/emc/modeling/noscrub/$user_name/nbns";
}
elsif( $machine eq "wcoss2" ){
$tankdir = "/lfs/h2/emc/da/noscrub/$user_name/nbns";
}

print "Please specify TANKDIR location for storage of data and image files.\n";
print " Return to accept default location or enter new location now.\n";
Expand Down Expand Up @@ -158,6 +160,10 @@
$my_ptmp="export MY_PTMP=\${MY_PTMP:-/scratch2/NCEPDEV/stmp3}";
$my_stmp="export MY_STMP=\${MY_STMP:-/scratch2/NCEPDEV/stmp1}";
}
elsif( $machine eq "wcoss2" ){
$my_ptmp="export MY_PTMP=\${MY_PTMP:-/lfs/h2/emc/ptmp}";
$my_stmp="export MY_STMP=\${MY_STMP:-/lfs/h2/emc/stmp}";
}

print "my_ptmp = $my_ptmp\n";
print "my_stmp = $my_stmp\n";
Expand All @@ -182,9 +188,6 @@
elsif( $_ =~ "WEBDIR=" ) {
print $out "$my_webdir\n";
}
elsif( $_ =~ "LITTLE_ENDIAN=" ) {
print $out "$little_endian\n";
}
elsif( $_ =~ "MY_MACHINE=" ) {
print $out "$my_machine\n";
}
Expand All @@ -210,17 +213,22 @@
print "Updating parm/RadMon_user_settings\n";

my $account = "export ACCOUNT=\${ACCOUNT:-fv3-cpu}";
if( $machine ne "hera" ) {
if( $machine eq "wcoss2" ){
$account = "export ACCOUNT=\${ACCOUNT:-GFS-DEV}";
} elsif ( $machine ne "hera" ) {
$account = "export ACCOUNT=\${ACCOUNT:-}";
}

my $project = "export PROJECT=\${PROJECT:-GDAS-T2O}";
if( $machine ne "wcoss_c" && $machine ne "wcoss_d" ) {
$project="export PROJECT=";
}
if( $machine eq "hera" ) {
$project = "export PROJECT=\${PROJECT:-GDAS-T2O}";
} elsif( $machine eq "wcoss_d" || $machine eq "wcoss2" ){
$project = "export PROJECT=\${PROJECT:-GFS-DEV}";
} else {
my $project="export PROJECT=";
}

my $job_queue="export JOB_QUEUE=";
if( $machine eq "wcoss_c" ) {
if( $machine eq "wcoss_c" || $machine eq "wcoss2" ) {
$job_queue="export JOB_QUEUE=\${JOB_QUEUE:-dev}";
} elsif( $machine eq "wcoss_d" ){
$job_queue = "export JOB_QUEUE=\${JOB_QUEUE:-dev_shared}";
Expand Down
35 changes: 14 additions & 21 deletions util/Radiance_Monitor/build_RadMon_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,17 @@ echo "top_level = ${top_level}"
export MY_RADMON=${MY_RADMON:-$top_level}
echo "MY_RADMON = ${MY_RADMON}"

if [[ -d /dcom && -d /hwrf ]] ; then
. /usrx/local/Modules/3.2.10/init/sh
target=wcoss
. $MODULESHOME/init/sh
elif [[ -d /cm ]] ; then
. $MODULESHOME/init/sh
target=wcoss_c
elif [[ -d /ioddev_dell ]]; then
target=`./get_machine.sh`
echo "target = $target"

if [[ $target = "wcoss_c" || $target = "wcoss_d" ||
$target = "orion" || $target = "wcoss2" ||
$target = "s4" ]] ; then
. $MODULESHOME/init/sh
target=wcoss_d
elif [[ -d /scratch1 ]] ; then
elif [[ $target = "hera" ]] ; then
. /apps/lmod/lmod/init/sh
target=hera
elif [[ -d /data ]] ; then
. /usr/share/lmod/lmod/init/sh
target=s4
elif [[ -d /work ]]; then
. $MODULESHOME/init/sh
target=orion
elif [[ -d /jetmon ]] ; then
elif [[ $target = "jet" ]] ; then
. /apps/lmod/lmod/init/sh
target=jet
else
echo "unknown target = $target"
exit 9
Expand Down Expand Up @@ -74,8 +63,8 @@ fi

if [[ ${target} = "hera" || ${target} = "wcoss" \
|| ${target} = "wcoss_c" || ${target} = "wcoss_d" \
|| ${target} = "orion" || ${target} = "jet" \
|| ${target} = "s4" ]]; then
|| ${target} = "orion" || ${target} = "jet" \
|| ${target} = "s4" || ${target} = "wcoss2" ]]; then
echo Building nwprod executables on ${target}
echo

Expand All @@ -100,6 +89,10 @@ if [[ ${target} = "hera" || ${target} = "wcoss" \
elif [ $target = wcoss_c ]; then
module purge
module load $dir_modules/modulefile.ProdGSI.$target
elif [ $target = wcoss2 ]; then
module purge
module use -a $dir_modules
module load modulefile.ProdGSI.$target.lua
fi


Expand Down
34 changes: 23 additions & 11 deletions util/Radiance_Monitor/data_extract/ush/RadMon_CP_glb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,30 @@ this_dir=`dirname $0`

top_parm=${this_dir}/../../parm

export RADMON_CONFIG=${RADMON_CONFIG:-${top_parm}/RadMon_config}
if [[ -s ${RADMON_CONFIG} ]]; then
. ${RADMON_CONFIG}
else
echo "Unable to source ${RADMON_CONFIG} (radmon config) file"
radmon_config=${radmon_config:-${top_parm}/RadMon_config}
if [[ ! -e ${radmon_config} ]]; then
echo "Unable to source ${radmon_config} file"
exit 2
fi

if [[ -s ${RADMON_USER_SETTINGS} ]]; then
. ${RADMON_USER_SETTINGS}
else
echo "Unable to source ${RADMON_USER_SETTINGS} (radmon user settings) file"
. ${radmon_config}
if [[ $? -ne 0 ]]; then
echo "Error detected while sourcing ${radmon_config} file"
exit $?
fi


radmon_user_settings=${radmon_user_settings:-${top_parm}/RadMon_user_settings}
if [[ ! -e ${radmon_user_settings} ]]; then
echo "Unable to source ${radmon_user_settings} file"
exit 3
fi

export USHradmon=${USHradmon:-$HOMEradmon/ush}
. ${radmon_user_settings}
if [[ $? -ne 0 ]]; then
echo "Unable to source ${radmon_user_settings} file"
exit $?
fi


#---------------------------------------------------------------
Expand Down Expand Up @@ -150,7 +158,7 @@ export CYC=`echo $PDATE|cut -c9-10`
# Set data and radstat locations
#---------------------------------------------------------------
if [[ -n ${radstat_loc} ]]; then
export RADSTAT_LOCATION=${radstat_loc}
RADSTAT_LOCATION=${radstat_loc}
fi
export RADSTAT_LOCATION=${RADSTAT_LOCATION}/${RUN}.${PDY}/${CYC}/atmos

Expand Down Expand Up @@ -182,6 +190,10 @@ if [[ -d ${DATA_LOCATION} ]]; then
elif [[ $MY_MACHINE = "hera" ]]; then
$SUB --account=${ACCOUNT} --time=10 -J ${jobname} -D . \
-o ${logfile} --ntasks=1 --mem=5g ${job}

elif [[ $MY_MACHINE = "wcoss2" ]]; then
$SUB -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -V \
-l select=1:mem=5000M -l walltime=20:00 -N ${jobname} ${job}
fi
else
echo "Unable to locate DATA_LOCATION: ${DATA_LOCATION}"
Expand Down
37 changes: 26 additions & 11 deletions util/Radiance_Monitor/data_extract/ush/RadMon_DE_glb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,32 @@ this_dir=`dirname $0`

top_parm=${this_dir}/../../parm

export RADMON_CONFIG=${RADMON_CONFIG:-${top_parm}/RadMon_config}
if [[ -s ${RADMON_CONFIG} ]]; then
. ${RADMON_CONFIG}
else
echo "Unable to source ${RADMON_CONFIG} file"
radmon_config=${radmon_config:-${top_parm}/RadMon_config}
if [[ ! -e ${radmon_config} ]]; then
echo "Unable to source ${radmon_config} file"
exit 2
fi

if [[ -s ${RADMON_USER_SETTINGS} ]]; then
. ${RADMON_USER_SETTINGS}
else
echo "Unable to source ${RADMON_USER_SETTINGS} file"
. ${radmon_config}
if [[ $? -ne 0 ]]; then
echo "Error detected while sourcing ${radmon_config} file"
exit $?
fi


radmon_user_settings=${radmon_user_settings:-${top_parm}/RadMon_user_settings}
if [[ ! -e ${radmon_user_settings} ]]; then
echo "Unable to source ${radmon_user_settings} file"
exit 3
fi

. ${radmon_user_settings}
if [[ $? -ne 0 ]]; then
echo "Unable to source ${radmon_user_settings} file"
exit $?
fi


#-------------------------------------------------------
# Create log and TANK directories if they don't exist
#-------------------------------------------------------
Expand Down Expand Up @@ -226,15 +237,19 @@ if [[ -e ${radstat} && -e ${biascr} ]]; then

if [[ $MY_MACHINE = "wcoss_d" ]]; then
$SUB -q $JOB_QUEUE -P $PROJECT -o ${logfile} \
-M 100 -R affinity[core] -W 0:20 -J ${jobname} -cwd ${PWD} ${job}
-M 5000 -R affinity[core] -W 0:20 -J ${jobname} -cwd ${PWD} ${job}

elif [[ $MY_MACHINE = "wcoss_c" ]]; then
$SUB -q $JOB_QUEUE -P $PROJECT -o ${logfile} \
-M 100 -W 0:20 -J ${jobname} -cwd ${PWD} ${job}
-M 5000 -W 0:20 -J ${jobname} -cwd ${PWD} ${job}

elif [[ $MY_MACHINE = "hera" ]]; then
$SUB --account=${ACCOUNT} --time=10 -J ${jobname} -D . \
-o ${logfile} --ntasks=1 --mem=5g ${job}

elif [[ $MY_MACHINE = "wcoss2" ]]; then
$SUB -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -V \
-l select=1:mem=5000M -l walltime=20:00 -N ${jobname} ${job}
fi

else # radstat and/or biascr not found
Expand Down
47 changes: 33 additions & 14 deletions util/Radiance_Monitor/data_extract/ush/RadMon_DE_rgn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -161,19 +161,30 @@ export RAD_AREA=rgn


top_parm=${this_dir}/../../parm
export RADMON_CONFIG=${RADMON_CONFIG:-${top_parm}/RadMon_config}

if [[ -s ${RADMON_CONFIG} ]]; then
. ${RADMON_CONFIG}
else
echo "Unable to source ${RADMON_CONFIG} file"
exit 2
radmon_config=${radmon_config:-${top_parm}/RadMon_config}
if [[ ! -e ${radmon_config} ]]; then
echo "Unable to source ${radmon_config} file"
exit 2
fi
if [[ -s ${RADMON_USER_SETTINGS} ]]; then
. ${RADMON_USER_SETTINGS}
else
echo "Unable to source ${RADMON_USER_SETTINGS} file"
exit 3

. ${radmon_config}
if [[ $? -ne 0 ]]; then
echo "Error detected while sourcing ${radmon_config} file"
exit $?
fi


radmon_user_settings=${radmon_user_settings:-${top_parm}/RadMon_user_settings}
if [[ ! -e ${radmon_user_settings} ]]; then
echo "Unable to source ${radmon_user_settings} file"
exit 3
fi

. ${radmon_user_settings}
if [[ $? -ne 0 ]]; then
echo "Unable to source ${radmon_user_settings} file"
exit $?
fi

#---------------------------------------------
Expand Down Expand Up @@ -280,15 +291,23 @@ mkdir -p ${DATA}

logfile=$LOGdir/DE.${PDY}.${cyc}.log

job=$HOMEnam/jobs/JNAM_VERFRAD

if [[ $MY_MACHINE = "wcoss_d" ]]; then
$SUB -q $JOB_QUEUE -P $PROJECT -M 40 -R affinity[core] -o ${logfile} \
-W 0:05 -J ${jobname} -cwd ${PWD} $HOMEnam/jobs/JNAM_VERFRAD
-W 0:05 -J ${jobname} -cwd ${PWD} ${job}

elif [[ $MY_MACHINE = "wcoss_c" ]]; then
$SUB -q $JOB_QUEUE -P $PROJECT -M 40 -o ${logfile} -W 0:10 \
-J ${jobname} -cwd ${PWD} $HOMEnam/jobs/JNAM_VERFRAD
-J ${jobname} -cwd ${PWD} ${job}

elif [[ $MY_MACHINE = "hera" ]]; then
$SUB -A $ACCOUNT -l procs=1,walltime=0:05:00 -N ${jobname} -V \
-j oe -o ${logfile} ${HOMEnam}/jobs/JNAM_VERFRAD
-j oe -o ${logfile} ${job}

elif [[ $MY_MACHINE = "wcoss2" ]]; then
$SUB -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -V \
-l select=1:mem=5000M -l walltime=20:00 -N ${jobname} ${job}
fi


Expand Down
Loading

0 comments on commit 888fdf9

Please sign in to comment.