NOAA-EMC / GDASApp

Global Data Assimilation System Application
GNU Lesser General Public License v2.1
15 stars 30 forks source link

Prepare JEDI increment so it can be used by MOM6 iau #121

Closed guillaumevernieres closed 2 years ago

guillaumevernieres commented 2 years ago

Description

The soca/jedi increment cannot be used "out of the box" by the MOM6 IAU routine, a few minor processing steps need to be applied.

Example of processing T and S can be found in this script

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

  scratch=scratch_socaincr2mom6
  mkdir -p $scratch
  cd $scratch

  cp $incr inc.nc                   # TODO: use accumulated incremnet, not outerloop intermediates
  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
}

Todo

hyunchul386 commented 2 years ago

Thanks for the description and will take a look for it.

hyunchul386 commented 2 years ago

A working local branch for the increment update to MOM6 with IAU is https://github.com/hyunchul386/GDASApp/tree/feature/incr-update

hyunchul386 commented 2 years ago

New test for the increment updated file (inc.nc) was added ctest #3, Test project /work/noaa/da/Hyun-Chul.Lee/GDASApp/build/test/soca Start 1: test_gdasapp_soca_obsdb 1/3 Test #1: test_gdasapp_soca_obsdb .......... Passed 26.63 sec Start 2: test_gdasapp_soca_ana_prep 2/3 Test #2: test_gdasapp_soca_ana_prep ....... Passed 4.03 sec Start 3: test_gdasapp_soca_ana_run 3/3 Test #3: test_gdasapp_soca_ana_run ........ Passed 33.26 sec

hyunchul386 commented 2 years ago

In the update (https://github.com/NOAA-EMC/GDASApp/commit/01f5aeae7091834a720ed9fec0b468ed907a0831) ~/scripts/exgdas_global_marine_analysis_run.sh "function socaincr2mom6" was added for the modifications to MOM6 Line #141 : add calling socaincr2mom6, triggered by $DO_OCN_IAU

~/test/soca/runtime_vars.sh defined $DO_OCN_IAU, and some directories for input files of socaincr2mom6

~/test/soca/test_run.sh added test_file for the generated increment file of inc.nc