Skip to content

Commit

Permalink
Merge branch 'develop' into feature/oops_app
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumevernieres authored Jul 14, 2023
2 parents 4d4ac26 + edd52d0 commit 8ef0418
Show file tree
Hide file tree
Showing 14 changed files with 201 additions and 23 deletions.
2 changes: 1 addition & 1 deletion parm/aero/hofx/hofx_nomodel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ geometry:
npx: $(npx_ges)
npy: $(npy_ges)
npz: $(npz_ges)
field metadata override: $(DATA)/fv3jedi/gfs-restart.yaml
field metadata override: $(DATA)/fv3jedi/fv3jedi_fieldmetadata_restart.yaml
state:
datapath: $(DATA)/bkg
filetype: fms restart
Expand Down
8 changes: 4 additions & 4 deletions parm/aero/variational/3dvar_gfs_aero.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ cost function:
npx: $(npx_ges)
npy: $(npy_ges)
npz: $(npz_ges)
field metadata override: $(DATA)/fv3jedi/gfs-restart.yaml
field metadata override: $(DATA)/fv3jedi/fv3jedi_fieldmetadata_restart.yaml
background:
datapath: $(DATA)/bkg
filetype: fms restart
Expand Down Expand Up @@ -55,7 +55,7 @@ variational:
npx: $(npx_anl)
npy: $(npy_anl)
npz: $(npz_anl)
field metadata override: $(DATA)/fv3jedi/gfs-restart.yaml
field metadata override: $(DATA)/fv3jedi/fv3jedi_fieldmetadata_restart.yaml
diagnostics:
departures: bkgmob
- ninner: 35
Expand All @@ -72,7 +72,7 @@ variational:
npx: $(npx_anl)
npy: $(npy_anl)
npz: $(npz_anl)
field metadata override: $(DATA)/fv3jedi/gfs-restart.yaml
field metadata override: $(DATA)/fv3jedi/fv3jedi_fieldmetadata_restart.yaml
diagnostics:
departures: bkgmob1
final:
Expand All @@ -90,7 +90,7 @@ final:
npx: $(npx_ges)
npy: $(npy_ges)
npz: $(npz_ges)
field metadata override: $(DATA)/fv3jedi/gfs-restart.yaml
field metadata override: $(DATA)/fv3jedi/fv3jedi_fieldmetadata_restart.yaml
output:
datapath: $(DATA)/anl
prefix: aeroinc
Expand Down
2 changes: 1 addition & 1 deletion parm/atm/hofx/hofx4d.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ geometry:
npx: $(npx_ges)
npy: $(npy_ges)
npz: $(npz_ges)
field metadata override: $(DATA)/fv3jedi/gfs-restart.yaml
field metadata override: $(DATA)/fv3jedi/fv3jedi_fieldmetadata_restart.yaml
initial condition:
datapath: $(DATA)/bkg
filetype: fms restart
Expand Down
2 changes: 1 addition & 1 deletion parm/atm/hofx/hofx_nomodel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ geometry:
npx: $(npx_ges)
npy: $(npy_ges)
npz: $(npz_ges)
field metadata override: $(DATA)/fv3jedi/gfs-restart.yaml
field metadata override: $(DATA)/fv3jedi/fv3jedi_fieldmetadata_restart.yaml
state:
datapath: $(DATA)/bkg
filetype: fms restart
Expand Down
2 changes: 1 addition & 1 deletion parm/atm/lgetkf/lgetkf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ geometry:
npx: $(npx_ges)
npy: $(npy_ges)
npz: $(npz_ges)
field metadata override: ./fv3jedi/gfs-restart.yaml
field metadata override: ./fv3jedi/fv3jedi_fieldmetadata_restart.yaml
window begin: '{{ ATM_WINDOW_BEGIN | to_isotime }}'
window length: $(ATM_WINDOW_LENGTH)
increment variables: [ua,va,DZ,delp,t,ps,sphum,ice_wat,liq_wat,o3mr]
Expand Down
8 changes: 4 additions & 4 deletions parm/atm/variational/3dvar_dripcg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cost function:
npx: $(npx_ges)
npy: $(npy_ges)
npz: $(npz_ges)
field metadata override: ./fv3jedi/gfs-restart.yaml
field metadata override: ./fv3jedi/fv3jedi_fieldmetadata_restart.yaml
background:
datapath: ./bkg
filetype: fms restart
Expand Down Expand Up @@ -47,7 +47,7 @@ variational:
npx: $(npx_anl)
npy: $(npy_anl)
npz: $(npz_anl)
field metadata override: ./fv3jedi/gfs-restart.yaml
field metadata override: ./fv3jedi/fv3jedi_fieldmetadata_restart.yaml
diagnostics:
departures: bkgmob
- ninner: 4
Expand All @@ -64,7 +64,7 @@ variational:
npx: $(npx_anl)
npy: $(npy_anl)
npz: $(npz_anl)
field metadata override: ./fv3jedi/gfs-restart.yaml
field metadata override: ./fv3jedi/fv3jedi_fieldmetadata_restart.yaml
diagnostics:
departures: bkgmob1
final:
Expand All @@ -86,4 +86,4 @@ final:
npx: $(npx_anl)
npy: $(npy_anl)
npz: $(npz_anl)
field metadata override: ./fv3jedi/gfs-restart.yaml
field metadata override: ./fv3jedi/fv3jedi_fieldmetadata_restart.yaml
68 changes: 68 additions & 0 deletions parm/io/fv3jedi_fieldmetadata_history.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
field metadata:

- long name: eastward_wind
io name: ugrd

- long name: northward_wind
io name: vgrd

- long name: specific_humidity
io name: spfh

- long name: air_temperature
io name: tmp

- long name: cloud_liquid_water
io name: clwmr

- long name: cloud_liquid_ice
io name: icmr

- long name: snow_water
io name: snmr

- long name: rain_water
io name: rwmr

- long name: graupel
io name: grle

- long name: cloud_ice_number_concentration
io name: nccice

- long name: rain_number_concentration
io name: nconrd

- long name: ozone_mass_mixing_ratio
io name: o3mr

- long name: air_pressure_thickness
io name: dpres

- long name: layer_thickness
io name: delz

- long name: upward_air_velocity
io name: dzdt

- long name: surface_pressure
io name: pressfc

- long name: sfc_geopotential_height_times_grav
io name: hgtsfc

- long name: u_component_of_native_D_grid_wind
io name: ud

- long name: v_component_of_native_D_grid_wind
io name: vd

- long name: stc
io name: soilt

- long name: soilMoistureVolumetric
io name: soilw

# Dummy IO name since stc and soilt are different in JEDI but same in UFS
- long name: soilt
io name: dummy_io_name
109 changes: 109 additions & 0 deletions parm/io/fv3jedi_fieldmetadata_restart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
field metadata:

- long name: u_component_of_native_D_grid_wind
io name: u

- long name: v_component_of_native_D_grid_wind
io name: v

- long name: air_temperature
io name: T

- long name: air_pressure_thickness
io name: DELP

- long name: layer_thickness
io name: DZ

- long name: stc
io file: surface

- long name: soilMoistureVolumetric
io name: smc
io file: surface

- long name: slmsk
interpolation type: nearest

- long name: totalSnowDepth
io name: snodl
interpolation type: nearest

- long name: vtype
interpolation type: nearest

- long name: fraction_of_ice
io name: fice
interpolation type: nearest

- long name: mass_fraction_of_dust001_in_air
io name: dust1
units: ugkg-1

- long name: mass_fraction_of_dust002_in_air
io name: dust2
units: ugkg-1

- long name: mass_fraction_of_dust003_in_air
io name: dust3
units: ugkg-1

- long name: mass_fraction_of_dust004_in_air
io name: dust4
units: ugkg-1

- long name: mass_fraction_of_dust005_in_air
io name: dust5
units: ugkg-1

- long name: mass_fraction_of_sea_salt001_in_air
io name: seas1
units: ugkg-1

- long name: mass_fraction_of_sea_salt002_in_air
io name: seas2
units: ugkg-1

- long name: mass_fraction_of_sea_salt003_in_air
io name: seas3
units: ugkg-1

- long name: mass_fraction_of_sea_salt004_in_air
io name: seas4
units: ugkg-1

- long name: mass_fraction_of_sea_salt005_in_air
io name: seas5
units: ugkg-1

- long name: mass_fraction_of_hydrophobic_black_carbon_in_air
io name: bc1
units: ugkg-1

- long name: mass_fraction_of_hydrophilic_black_carbon_in_air
io name: bc2
units: ugkg-1

- long name: mass_fraction_of_hydrophobic_organic_carbon_in_air
io name: oc1
units: ugkg-1

- long name: mass_fraction_of_hydrophilic_organic_carbon_in_air
io name: oc2
units: ugkg-1

- long name: mass_fraction_of_sulfate_in_air
io name: so4
units: ugkg-1

- long name: mass_fraction_of_nitrate001_in_air
io name: no3an1
units: ugkg-1

- long name: mass_fraction_of_nitrate002_in_air
io name: no3an2
units: ugkg-1

- long name: mass_fraction_of_nitrate003_in_air
io name: no3an3
units: ugkg-1
2 changes: 1 addition & 1 deletion parm/land/hofx/hofx_nomodel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ geometry:
npx: $(npx_ges)
npy: $(npy_ges)
npz: $(npz_ges)
field metadata override: $(DATA)/fv3jedi/gfs-land.yaml
field metadata override: $(DATA)/fv3jedi/fv3jedi_fieldmetadata_restart.yaml
time invariant fields:
state fields:
datetime: '{{ LAND_WINDOW_BEGIN | to_isotime }}'
Expand Down
2 changes: 1 addition & 1 deletion parm/land/letkfoi/letkfoi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ geometry:
npx: $(npx_ges)
npy: $(npy_ges)
npz: $(npz_ges)
field metadata override: $(DATA)/fv3jedi/gfs-land.yaml
field metadata override: $(DATA)/fv3jedi/fv3jedi_fieldmetadata_restart.yaml
time invariant fields:
state fields:
datetime: '{{ LAND_WINDOW_BEGIN | to_isotime }}'
Expand Down
5 changes: 3 additions & 2 deletions test/land/letkfoi_snowda.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
set -e
set -xe
################################################
YY=2021
MM=03
Expand Down Expand Up @@ -64,7 +64,8 @@ fi
# Prepare and Run JEDI
############################################
mkdir -p Data diags
ln -s ${project_binary_dir}/fv3-jedi/test/Data/fieldmetadata Data/fieldmetadata
mkdir -p Data/fieldmetadata
ln -s ${project_source_dir}/parm/io/fv3jedi_fieldmetadata_restart.yaml Data/fieldmetadata/.
ln -s ${project_binary_dir}/fv3-jedi/test/Data/fv3files Data/fv3files
ln -s ${project_source_dir}/ush/land/genYAML_output_letkfoi.yaml letkf_land.yaml
ln -s ${OBSDIR}/snow_depth/GTS/202103/adpsfc_snow_2021032318.nc4 adpsfc_snow.nc4
Expand Down
2 changes: 1 addition & 1 deletion ush/land/genYAML_output_letkfoi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ driver:
save posterior mean increment: 'true'
geometry:
akbk: Data/fv3files/akbk127.nc4
field metadata override: Data/fieldmetadata/gfs-land.yaml
field metadata override: Data/fieldmetadata/fv3jedi_fieldmetadata_restart.yaml
fms initialization:
field table filename: Data/fv3files/field_table
namelist filename: Data/fv3files/fmsmpp.nml
Expand Down
6 changes: 3 additions & 3 deletions ush/ufsda/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ def gdas_fix(input_fix_dir, working_dir, config):
os.path.join(config['fv3jedi_fix_dir'], 'field_table'))
# link fieldmetadata
# Note that the required data will be dependent on input file type (restart vs history, etc.)
ufsda.disk_utils.symlink(os.path.join(input_fix_dir, 'fv3jedi',
'fieldmetadata', 'gfs-restart.yaml'),
os.path.join(config['fv3jedi_fieldmetadata_dir'], 'gfs-restart.yaml'))
gdasapp_parm = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'parm'))
ufsda.disk_utils.symlink(os.path.join(gdasapp_parm, 'io', 'fv3jedi_fieldmetadata_restart.yaml'),
os.path.join(config['fv3jedi_fieldmetadata_dir'], 'fv3jedi_fieldmetadata_restart.yaml'))
# link CRTM coeff dir
ufsda.disk_utils.symlink(os.path.join(input_fix_dir, 'crtm', '2.3.0'),
config['CRTM_COEFF_DIR'])
Expand Down
6 changes: 3 additions & 3 deletions ush/ufsda/yamltools.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def fv3atm_geom_dict(case, levs, ntiles, layout, io_layout):
'npy': str(case+1),
'npz': str(levs-1),
'ntiles': str(ntiles),
'field metadata override': '$(fv3jedi_fieldmetadata_dir)/gfs-restart.yaml'
'field metadata override': '$(fv3jedi_fieldmetadata_dir)/fv3jedi_fieldmetadata_restart.yaml'
}
return outdict

Expand All @@ -154,7 +154,7 @@ def fv3land_geom_dict(case, levs, ntiles, layout, io_layout):
'npy': str(case+1),
'npz': str(levs-1),
'ntiles': str(ntiles),
'field metadata override': '$(fv3jedi_fieldmetadata_dir)/gfs-land.yaml',
'field metadata override': '$(fv3jedi_fieldmetadata_dir)/fv3jedi_fieldmetadata_restart.yaml',

'time invariant fields': {
'state fields': {
Expand Down Expand Up @@ -184,7 +184,7 @@ def fv3aero_geom_dict(case, levs, ntiles, layout, io_layout):
'npy': str(case+1),
'npz': str(levs-1),
'ntiles': str(ntiles),
'field metadata override': '$(fv3jedi_fieldmetadata_dir)/gfs-aero.yaml',
'field metadata override': '$(fv3jedi_fieldmetadata_dir)/fv3jedi_fieldmetadata_restart.yaml',

}
return outdict
Expand Down

0 comments on commit 8ef0418

Please sign in to comment.