Tuesday: Working with Models

Today we will explore making changes to the yaml files that control the variational application.

First download a fresh copy of the hyb-3dvar.yaml

wget http://academy.jcsda.org/june2019/hyb-3dvar.yaml

This fixes one thing needed for the trajectory that was recently merged and updates the variables.

Exercise 1: Run a hybrid-fgat assimilation

  • Copy the config files and rename hyb-3dvar to hyb-fgat. This is the new experiment name.
  • Update instances of experiment name in all the yaml files
  • Background and ensemble time changes from 20180415 00z to 20180414 21z
  • Add u and v to the background variables. They are needed to start the model.
  • Change the time step from 3 hours to 1 hour. This is how often we analyze the observations.
  • Cost function needs to change from 3D-Var in the yaml, can you find the cost function factories in oops/src/oops/assimilation/? Tip: you have to find the file that instantiates the cost factory. FGAT uses the 4DVar cost function so change to that in the yaml, the exact name comes from the factory file.
  • Remove the second outer loop from variational: iteration: (Tip: the second outer loop has 5 inner loop iterations).
  • ./run.bash hyb-fgat
  • Plot the new increment with Panoply and check Jo/n in the log

Exercise 2: Run a hybrid 4d-var

Starting from the fgat run change the linear model to use the actual tlm and adjoint of fv3.

Tips:

  1. The LinearModel is no longer named Id in the version or type and the VarChange is now Analysis2Model.
  2. The variables for the LinearModel & traj are now: variables: ["ud","vd","T","delp","sphum","ice_wat","liq_wat","o3mr"]
  3. You’ll need some more things in the configuration:

lm_do_dyn: 1

lm_do_trb: 0

lm_do_mst: 0

nml_file: Data/fv3files/input_gfs_c12.nml

trc_file: Data/fv3files/field_table

nml_file_pert: Data/fv3files/inputpert_4dvar.nml

  • Plot increment and check Jo/n in the log

Exercise 3: Examine BUMP dirac test output

One of the regression tests run when building Jedi was a dirac test for GEOS.

test_fv3jedi_dirac_geos

It produced the output:

build/fv3-jedi/test/Data/bump/dirac.loc.20180414_210000z.nc4

Copy this file and open it with Panoply. The increment is at level 50 of ua.

Now try modifying rh and rv in:

build/fv3-jedi/test/testinput/bumpparameters_loc_geos.yaml.

You can also modify build/fv3-jedi/test/testinput/dirac_geos.yaml - e.g. you can add more Dirac tests or change the variable and position.

Once you’ve modified rh and rv test by re-running

ctest -R test_fv3jedi_bumpparameters_loc

ctest -R test_fv3jedi_dirac_geos

Plot the increment again and look at the impact of changing rh and rv.

Exercise 4 (optional): Adapt the hyb-3dvar.yaml to run 4denvar.yaml

Tip, there’s an example here: oops/qg/test/testinput/4densvar_bump.yaml