Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions scripts/exgdas_global_marine_analysis_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,29 @@ pwd=$(pwd)
# Utilities
export NLN=${NLN:-"/bin/ln -sf"}

function socaincr2mom6 {
incr=$1
bkg=$2
grid=$3
incr_out=$4

scratch=scratch_socaincr2mom6
mkdir -p $scratch
cd $scratch

echo "at socaincr2mom6" $bkg $grid

cp $incr inc.nc # TODO: use accumulated incremnet, not outerloop intermediates

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove comment once you point to the total increment.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't look like it, I still see # TODO: use accumulated incremnet, not outerloop intermediates ... which presumably was done

ncks -A -C -v h $bkg inc.nc # Replace h incrememnt (all 0's) by h background (expected by MOM)
ncrename -d zaxis_1,Layer inc.nc # Rename zaxis_1 to Layer
ncks -A -C -v Layer $bkg inc.nc # Replace dimension-less Layer with dimensional Layer
mv inc.nc inc_tmp.nc # ... dummy copy
ncwa -O -a Time inc_tmp.nc inc.nc # Remove degenerate Time dimension
ncks -A -C -v lon $grid inc.nc # Add longitude
ncks -A -C -v lat $grid inc.nc # Add latitude
mv inc.nc $incr_out
}

function bump_vars()
{
tmp=$(ls -d ${1}_* )
Expand Down Expand Up @@ -108,6 +131,12 @@ concatenate_bump 'bump3d'
clean_yaml var.yaml
$APRUN_SOCAANAL $JEDI_BIN/soca_var.x var.yaml 2>var.err


# increments update for MOM6
( socaincr2mom6 `ls -t ${DATA}/Data/ocn.*3dvar*.incr* | head -1` ${DATA}/INPUT/MOM.res.nc ${DATA}/soca_gridspec.nc ${DATA}/Data/inc.nc )
Comment thread
hyunchul386 marked this conversation as resolved.



################################################################################
set +x
if [ $VERBOSE = "YES" ]; then
Expand Down
1 change: 1 addition & 0 deletions test/soca/runtime_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ export R2D2_OBS_SRC=gdasapp
export R2D2_OBS_WINDOW=24 # R2D2 sampling DB window

export APRUN_SOCAANAL="$MPIEXEC_EXEC $MPIEXEC_NPROC 6"

1 change: 1 addition & 0 deletions test/soca/test_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,4 @@ test_file ${project_binary_dir}/test/soca/3dvar/analysis/Data/ocn.3dvarfgat_pse
test_file ${project_binary_dir}/test/soca/3dvar/analysis/Data/ocn.3dvarfgat_pseudo.an.2018-04-15T09:00:00Z.nc
test_file ${project_binary_dir}/test/soca/3dvar/analysis/Data/ocn.3dvarfgat_pseudo.an.2018-04-15T12:00:00Z.nc
test_file ${project_binary_dir}/test/soca/3dvar/analysis/Data/ocn.3dvarfgat_pseudo.an.2018-04-15T15:00:00Z.nc
test_file ${project_binary_dir}/test/soca/3dvar/analysis/Data/inc.nc