Skip to content

Commit

Permalink
add doc dir
Browse files Browse the repository at this point in the history
  • Loading branch information
weihuang-jedi committed Aug 1, 2022
1 parent af14f56 commit 7c34b3d
Show file tree
Hide file tree
Showing 4 changed files with 182 additions and 6 deletions.
6 changes: 0 additions & 6 deletions convertGSIhofx2ioda/modifyOMB.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,6 @@ def process_file(self, infile, outfile, varlist=[]):

n = 0
for grp in ncin.groups:
if(grp.find('hofxm0_') >=0):
continue

if(grp.find('hofx_y_mean_xb0') >=0):
continue

n += 1
if (self.debug):
print('\tgroup No. %d: %s' %(n, grp))
Expand Down
89 changes: 89 additions & 0 deletions doc/gen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#!/bin/bash

#set -x

taskspernode=40
NUMMEM=80
MYLAYOUT=1,20

#cpu_list=( 6 12 18 24 30 36 72 78)
#nodelist=( 1 1 1 1 1 1 2 2)
#lay_list=("1,1" "1,2" "1,3" "1,4" "1,5" "1,6" "1,12" "1,13")

#cpu_list=( 36)
#nodelist=( 1)
#lay_list=("2,3")

#cpu_list=( 78)
#nodelist=( 2)
#lay_list=(1,13)

#cpu_list=( 156)
#nodelist=( 4)
#lay_list=(2,13)

#cpu_list=( 312)
#nodelist=( 8)
#lay_list=(4,13)

cpu_list=( 36 78 156 312)
nodelist=( 1 2 4 8)
lay_list=(3,2 1,13 2,13 4,13)

templatedir=/work2/noaa/gsienkf/weihuang/jedi/case_study/templates
topdir=/work2/noaa/gsienkf/weihuang/jedi/case_study
#caselist=(aircraft amsua iasi satwind scatwind sfcship sondes surf vadwind windprof)
caselist=(amsua iasi)

#------------------------------------------------------------------------------
n=0
for j in ${!caselist[@]}
do
case=${caselist[$j]}
echo "Case: $case"
casedir=${topdir}/${case}

cd ${casedir}
ln -sf ../Data .
ln -sf ../ioda_v2_data .

for i in ${!cpu_list[@]}
do
echo "element $i is ${myArray[$i]}"
totalcpus=${cpu_list[$i]}
nodes=${nodelist[$i]}
MYLAYOUT=${lay_list[$i]}

workdir=${casedir}/run_${NUMMEM}.${taskspernode}t${nodes}n_${totalcpus}p
mkdir -p ${workdir}
cd ${workdir}

sed -e "s?TASKSPERNODE?${taskspernode}?g" \
-e "s?TOTALNODES?${nodes}?g" \
-e "s?TOTALCPUS?${totalcpus}?g" \
-e "s?WORKDIR?${workdir}?g" \
-e "s?NUMMEM?${NUMMEM}?g" \
-e "s?MYLAYOUT?${MYLAYOUT}?g" \
${templatedir}/slurm.template > run.slurm

sed -e "s?LAYOUT?${MYLAYOUT}?" \
-e "s?NUMBEROFMEMBERS?${NUMMEM}?" \
${templatedir}/getkf.yaml.template > getkf.yaml

cat ${templatedir}/${case}.obs.yaml.template >> getkf.yaml

#if [ $n -lt 1 ]
#then
#DEPEND=$(sbatch --parsable run.slurm)
#echo "job_id: ${DEPEND}"
#sbatch run.slurm
#else
#DEPEND=$(sbatch --dependency=afterany:${DEPEND} --parsable run.slurm)
sbatch run.slurm
#fi

n=$((n+1))
cd ${casedir}
done
done

26 changes: 26 additions & 0 deletions doc/genlinks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

set -x

src_dir=/work2/noaa/gsienkf/weihuang/C96_psonly_delp/2020011006

number_members=80
n=1
while [ $n -le $number_members ]
do
if [ $n -lt 10 ]
then
member_str=mem00${n}
elif [ $n -lt 100 ]
then
member_str=mem0${n}
else
member_str=mem${n}
fi

#ln -sf ${src_dir}/${member_str}/INPUT ${member_str}
cp coupler.res ${member_str}/.

n=$(( $n + 1 ))
done

67 changes: 67 additions & 0 deletions doc/how2run.jedi-sondes
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
How to run JEDI with radiosondes

Wei Huang

This is for runs on orion.

1. convert GSI daignose observation file to IODA2
a. working directory: /work2/noaa/gsienkf/weihuang/jedi/case_study/diag2iodav2
b. prepare observation files to "obs" directory, like:
diag_conv_t_ges.2020011006_ensmean2.nc4
diag_conv_q_ges.2020011006_ensmean2.nc4
diag_conv_uv_ges.2020011006_ensmean2.nc4
c. run script diag2ioda.sh
d. after run this script, generate ioda2 observation files in directory "out", like:
aircraft_q_obs_2020011006.nc4
aircraft_tsen_obs_2020011006.nc4
aircraft_uv_obs_2020011006.nc4
satwind_obs_2020011006.nc4
scatwind_obs_2020011006.nc4
sfc_ps_obs_2020011006.nc4
sfcship_ps_obs_2020011006.nc4
sfcship_q_obs_2020011006.nc4
sfcship_tsen_obs_2020011006.nc4
sfcship_tv_obs_2020011006.nc4
sfcship_uv_obs_2020011006.nc4
sondes_ps_obs_2020011006.nc4
sondes_q_obs_2020011006.nc4
sondes_tsen_obs_2020011006.nc4
sondes_tv_obs_2020011006.nc4
sondes_uv_obs_2020011006.nc4
vadwind_obs_2020011006.nc4
windprof_obs_2020011006.nc4

2. rename above directory to JEDI top directory as directory: ioda_v2_data
For run with sondes only, files:
sondes_q_obs_2020011006.nc4
sondes_tsen_obs_2020011006.nc4
sondes_tv_obs_2020011006.nc4
are used.

NOTE: use sondes_ps_obs_2020011006.nc4 as surface pressure data will be more convient,
as it is close to surface observations.

3. run JEDI sondes data
a. prepare ensemble Data, as in: /work2/noaa/gsienkf/weihuang/jedi/Data/ens
b. working directory: /work2/noaa/gsienkf/weihuang/jedi/case_study/sondes
c. edit script gen.sh:
i) setup task used per node
ii) Number of ensembles members
iii) IO layout
iv) number of node used
v) casename
vi) datetime
vii) obsin(s)
viii) obsout(s)
ix) link Data and obs directory
x) process two templates: slurm.template for a run script: run.slurm;
getkf.yaml.template to produce getkf.yaml file.
xi) run as batch job: "sbatch run.slurm".

4. in getkf.yaml.template, there are kinds of output options.
a. the current option is output to FV3 tiles.
in directory: /work2/noaa/gsienkf/weihuang/jedi/case_study/vis/regrid
one can use interp.sh to interpolate FV3 cube data to regular lat-lon grid.
b. commented out one is latlon (actually Gaussian) grid.
be aware that this Gaussian grid may not exactly the same as GSI Gaussian grid.

0 comments on commit 7c34b3d

Please sign in to comment.