Skip to content

Commit

Permalink
Add atmospheric 3DVar case (#302)
Browse files Browse the repository at this point in the history
* add 3dvar standalone

* now works w/ 3d - not sure what if messes up ocean 3d

* in var-mode the Water_Temperature geoval cannot be found! Not sure why?

* these now work; but depend on fv3-jedi PR#1154

* same issue as with the sondes ... need to be understood

* a couple of the filters here cause 3dvar to fail - need attention

* co2 not needed in linear model; and it causes crash in var

* identation was incorrect - my mistake when I added the cov

* though no-longer available, chn 14 is not bias corrected when avail

* no co2 in liear operator

* addresses issue #307

* clean up the one change I made that could upset the ocean 3dvar settings

* does not belong here

* bypass jb diagnostic

* no need to spell out minimizer - too much maintenance

* works now

* all works - contour levels need some work

* no issue w/ this scaling and the NL oper; but linear op should apparently not have this scaling

* I was wrong about turning this on

* silly error

* works up to increment

* now we show residual rms differences; and increments plots is fixed

* adjusted to match jedi and latest eva - works fine

* fix title of rmsres; fig log of norm

* add knob for IR to take channel correlated R - working, but need science investigation - results look too close w/ and w/o corr

* this adds FGAT (atmos) capability to swell

* for now, since this is wired, make the time the correct time for FGAT, ie initial time of var

* quick fix for eva to work for 3dfgat

* gsibec config nml

* rename of gsibec namelist files

* minor fixes (already in 4d-branch

* this needs to be looked into closely

* 3d now runs in 3 nodes

* with 4x4 (3 nodes) this runs just fine w/ RCOV

* first pass

* yaml templating

* unused var

* resolve swell test

* adapt to skylab7 modules

* update due to skylab7 modules

* erase the extra purge

* eva increment and yaml changes

* delete obs error filter during testing

* minor count diff due to changes in observer scaling

* temporary var exception

* eva increment filename and use of clean patterns

---------

Co-authored-by: asewnath <[email protected]>
Co-authored-by: dooruk <[email protected]>
Co-authored-by: Doruk Ardağ <[email protected]>
  • Loading branch information
4 people authored Apr 17, 2024
1 parent 597cca3 commit 0dd142d
Show file tree
Hide file tree
Showing 51 changed files with 3,576 additions and 82 deletions.
2 changes: 1 addition & 1 deletion src/swell/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
repo_directory = os.path.dirname(__file__)

# Set the version for swell
__version__ = '1.8.5'
__version__ = '1.9.0'
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ saber central block:
read:
gsi akbk: '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/fv3files/akbk{{vertical_resolution}}.nc4'
gsi error covariance file: '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/gsibec/gsibec_coefficients_c{{horizontal_resolution}}.nc4'
gsi berror namelist file: '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/gsibec/gsibec_configuration_c{{horizontal_resolution}}.nml'
gsi berror namelist file: '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/gsibec/{{gsibec_configuration}}_c{{horizontal_resolution}}.nml'
processor layout x direction: {{gsibec_npx_proc}}
processor layout y direction: {{gsibec_npy_proc}}
debugging mode: false
Expand All @@ -13,12 +13,10 @@ saber outer blocks:
state variables to inverse: &bvars [eastward_wind,northward_wind,air_temperature,surface_pressure,
specific_humidity,cloud_liquid_ice,cloud_liquid_water,
mole_fraction_of_ozone_in_air,
skin_temperature,
fraction_of_ocean,fraction_of_lake,fraction_of_ice,
sfc_geopotential_height_times_grav]
gsi akbk: '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/fv3files/akbk{{vertical_resolution}}.nc4'
gsi error covariance file: '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/gsibec/gsibec_coefficients_c{{horizontal_resolution}}.nc4'
gsi berror namelist file: '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/gsibec/gsibec_configuration_c{{horizontal_resolution}}.nml'
gsi berror namelist file: '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/gsibec/{{gsibec_configuration}}_c{{horizontal_resolution}}.nml'
processor layout x direction: {{gsibec_npx_proc}}
processor layout y direction: {{gsibec_npy_proc}}
debugging mode: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
- ['{{experiment_root}}/{{experiment_id}}/jedi_bundle/source/fv3-jedi/test/Data/fieldmetadata/*', '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/fieldmetadata/']
- ['{{experiment_root}}/{{experiment_id}}/jedi_bundle/source/fv3-jedi/test/Data/fv3files/*', '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/fv3files/']
- ['{{swell_static_files}}/jedi/interfaces/geos_atmosphere/gsibec/gsibec_coefficients_c{{horizontal_resolution}}.nc4', '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/gsibec/']
- ['{{swell_static_files}}/jedi/interfaces/geos_atmosphere/gsibec/gsibec_configuration_c{{horizontal_resolution}}.nml', '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/gsibec/']
- ['{{swell_static_files}}/jedi/interfaces/geos_atmosphere/gsibec/{{gsibec_configuration}}_c{{horizontal_resolution}}.nml', '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/gsibec/']
- ['{{swell_static_files}}/jedi/interfaces/geos_atmosphere/rcov/1.0.0/*', '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/rcov/']
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
write increment: true
increment:
state component:
filetype: auxgrid
gridtype: latlon
datapath: ./
filename: {{experiment_id}}.increment-iter1.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ obs operator:
- name: windNorthward

# Hofx scaling
hofx scaling field: SurfaceWindScalingPressure
hofx scaling field group: DerivedVariables
# hofx scaling field: SurfaceWindScalingPressure
# hofx scaling field group: DerivedVariables

- name: VertInterp
observation alias file: '{{experiment_root}}/{{experiment_id}}/configuration/jedi/interfaces/{{model_component}}/observations/obsop_name_map.yaml'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ obs operator:

linear obs operator:
Absorbers: [H2O,O3]
Surfaces: [Water_Temperature]
Surfaces: [Water_Temperature,Land_Temperature,Ice_Temperature,Snow_Temperature]

obs bias:
input file: '{{cycle_dir}}/airs_aqua.{{background_time}}.satbias.nc4'
Expand Down Expand Up @@ -53,6 +53,10 @@ obs bias:
ratio for small dataset: 2.0
output file: '{{cycle_dir}}/airs_aqua.{{window_begin}}.satbias.nc4'

obs error:
covariance model: cross variable covariances
input file: '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/rcov/airs_aqua_119_jedi_rcov.nc4'

obs prior filters:
- filter: Perform Action
filter variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ obs operator:

obs bias:
input file: '{{cycle_dir}}/amsua_aqua.{{background_time}}.satbias.nc4'
variables without bc: [brightnessTemperature]
channels: 14
variational bc:
predictors:
- name: constant
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ obs bias:
step size: 1.0e-4
largest analysis variance: 10000.0
prior:
input file: '{{cycle_dir}}/INSTRUMENT.{{background_time}}.satbias.nc4'
input file: '{{cycle_dir}}/amsua_metop-c.{{background_time}}.satbias.nc4'
inflation:
ratio: 1.1
ratio for small dataset: 2.0
output file: '{{cycle_dir}}/INSTRUMENT.{{window_begin}}.satbias.nc4'
output file: '{{cycle_dir}}/amsua_metop-c.{{window_begin}}.satbias.nc4'

obs prior filters:
# Assign obs error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ obs operator:
CoefficientPath: '{{crtm_coeff_dir}}/'
linear obs operator:
Absorbers: [H2O,O3]
Surfaces: [Water_Temperature]
Surfaces: [Water_Temperature,Land_Temperature,Ice_Temperature,Snow_Temperature]

obs bias:
input file: '{{cycle_dir}}/cris-fsr_n20.{{background_time}}.satbias.nc4'
Expand Down Expand Up @@ -52,6 +52,10 @@ obs bias:
ratio for small dataset: 2.0
output file: '{{cycle_dir}}/cris-fsr_n20.{{window_begin}}.satbias.nc4'

obs error:
covariance model: cross variable covariances
input file: '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/rcov/cris-fsr_108_jedi_rcov.nc4'

obs prior filters:
- filter: Perform Action
filter variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ obs operator:
CoefficientPath: '{{crtm_coeff_dir}}/'
linear obs operator:
Absorbers: [H2O,O3]
Surfaces: [Water_Temperature]
Surfaces: [Water_Temperature,Land_Temperature,Ice_Temperature,Snow_Temperature]

obs bias:
input file: '{{cycle_dir}}/cris-fsr_npp.{{background_time}}.satbias.nc4'
Expand Down Expand Up @@ -52,6 +52,10 @@ obs bias:
ratio for small dataset: 2.0
output file: '{{cycle_dir}}/cris-fsr_npp.{{window_begin}}.satbias.nc4'

obs error:
covariance model: cross variable covariances
input file: '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/rcov/cris-fsr_108_jedi_rcov.nc4'

obs prior filters:
- filter: Perform Action
filter variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ obs operator:
CoefficientPath: '{{crtm_coeff_dir}}/'
linear obs operator:
Absorbers: [H2O,O3]
Surfaces: [Water_Temperature]
Surfaces: [Water_Temperature,Land_Temperature,Ice_Temperature,Snow_Temperature]

obs bias:
input file: '{{cycle_dir}}/iasi_metop-b.{{background_time}}.satbias.nc4'
Expand Down Expand Up @@ -52,6 +52,10 @@ obs bias:
ratio for small dataset: 2.0
output file: '{{cycle_dir}}/iasi_metop-b.{{window_begin}}.satbias.nc4'

obs error:
covariance model: cross variable covariances
input file: '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/rcov/iasi_metop_141_jedi_rcov.nc4'

obs prior filters:
- filter: Perform Action
filter variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ obs operator:
CoefficientPath: '{{crtm_coeff_dir}}/'
linear obs operator:
Absorbers: [H2O,O3]
Surfaces: [Water_Temperature]
Surfaces: [Water_Temperature,Land_Temperature,Ice_Temperature,Snow_Temperature]

obs bias:
input file: '{{cycle_dir}}/iasi_metop-c.{{background_time}}.satbias.nc4'
Expand Down Expand Up @@ -52,6 +52,10 @@ obs bias:
ratio for small dataset: 2.0
output file: '{{cycle_dir}}/iasi_metop-c.{{window_begin}}.satbias.nc4'

obs error:
covariance model: cross variable covariances
input file: '{{experiment_root}}/{{experiment_id}}/stage/fv3-jedi/geos_atmosphere/rcov/iasi_metop_141_jedi_rcov.nc4'

obs prior filters:
- filter: Perform Action
filter variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ obs operator:
EndianType: little_endian
CoefficientPath: '{{crtm_coeff_dir}}/'
linear obs operator:
Absorbers: [H2O,O3,CO2]
Absorbers: [H2O,O3]
Clouds: [Water]
Surfaces: [Water_Temperature]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ obs operator:
EndianType: little_endian
CoefficientPath: '{{crtm_coeff_dir}}/'
linear obs operator:
Absorbers: [H2O,O3,CO2]
Absorbers: [H2O,O3]
Clouds: [Water]
Surfaces: [Water_Temperature]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@ obs filters:
action:
name: reject
# Reject rows 25+ (somewhat stringent but thats what we do in GEOS)
- filter: Bounds Check
filter variables:
- name: ozoneTotal
test variables:
- name: MetaData/sensorScanPosition
minvalue: 3
maxvalue: 24
action:
name: reject
#- filter: Bounds Check
# filter variables:
# - name: ozoneTotal
# test variables:
# - name: MetaData/sensorScanPosition
# minvalue: 3
# maxvalue: 24
# action:
# name: reject

# Gross check
- filter: Background Check
filter variables:
- name: ozoneTotal
threshold: 5.0
action:
name: reject
#- filter: Background Check
# filter variables:
# - name: ozoneTotal
# threshold: 5.0
# action:
# name: reject
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ obs filters:
action:
name: reject
# Gross check
- filter: Background Check
filter variables:
- name: ozoneTotal
threshold: 5.0
action:
name: reject
#- filter: Background Check
# filter variables:
# - name: ozoneTotal
# threshold: 5.0
# action:
# name: reject
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ obs operator:
interpolation method backup: log-linear

# Hofx scaling
hofx scaling field: SurfaceWindScalingCombined
hofx scaling field group: DerivedVariables
# hofx scaling field: SurfaceWindScalingCombined
# hofx scaling field group: DerivedVariables

obs pre filters:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ obs space:
obs operator:
name: VertInterp
observation alias file: '{{experiment_root}}/{{experiment_id}}/configuration/jedi/interfaces/{{model_component}}/observations/obsop_name_map.yaml'
hofx scaling field: SurfaceWindScalingPressure
hofx scaling field group: DerivedVariables
# hofx scaling field: SurfaceWindScalingPressure
# hofx scaling field group: DerivedVariables

obs prior filters:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ obs operator:
observation vertical coordinate group: DerivedVariables
observation vertical coordinate: adjustedHeight
interpolation method: linear
hofx scaling field: SurfaceWindScalingHeight
hofx scaling field group: DerivedVariables
# hofx scaling field: SurfaceWindScalingHeight
# hofx scaling field group: DerivedVariables

obs prior filters:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ obs operator:
observation vertical coordinate group: DerivedVariables
observation vertical coordinate: adjustedHeight
interpolation method: linear
hofx scaling field: SurfaceWindScalingHeight
hofx scaling field group: DerivedVariables
# hofx scaling field: SurfaceWindScalingHeight
# hofx scaling field group: DerivedVariables

# Temperatures use vertical interpolation
- name: VertInterp
Expand Down Expand Up @@ -64,8 +64,8 @@ linear obs operator:
observation vertical coordinate group: DerivedVariables
observation vertical coordinate: adjustedHeight
interpolation method: linear
hofx scaling field: SurfaceWindScalingHeight
hofx scaling field group: DerivedVariables
# hofx scaling field: SurfaceWindScalingHeight
# hofx scaling field group: DerivedVariables

# Temperatures use vertical interpolation
- name: VertInterp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ obs operator:
observation vertical coordinate group: DerivedVariables
observation vertical coordinate: adjustedHeight
interpolation method: linear
hofx scaling field: SurfaceWindScalingHeight
hofx scaling field group: DerivedVariables
# hofx scaling field: SurfaceWindScalingHeight
# hofx scaling field group: DerivedVariables

- name: VertInterp
observation alias file: '{{experiment_root}}/{{experiment_id}}/configuration/jedi/interfaces/{{model_component}}/observations/obsop_name_map.yaml'
Expand Down Expand Up @@ -60,8 +60,8 @@ linear obs operator:
observation vertical coordinate group: DerivedVariables
observation vertical coordinate: adjustedHeight
interpolation method: linear
hofx scaling field: SurfaceWindScalingHeight
hofx scaling field group: DerivedVariables
# hofx scaling field: SurfaceWindScalingHeight
# hofx scaling field group: DerivedVariables

- name: VertInterp
observation alias file: '{{experiment_root}}/{{experiment_id}}/configuration/jedi/interfaces/{{model_component}}/observations/obsop_name_map.yaml'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ linear obs operator:
- name: windNorthward

# Hofx scaling
hofx scaling field: SurfaceWindScalingPressure
hofx scaling field group: DerivedVariables
# hofx scaling field: SurfaceWindScalingPressure
# hofx scaling field group: DerivedVariables

- name: VertInterp
variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: CRTM
Absorbers: [H2O,O3,CO2]
linear obs operator:
Absorbers: [H2O,O3,CO2]
Absorbers: [H2O,O3]
Surfaces: [Water_Temperature]
obs options:
Sensor_ID: &Sensor_ID ssmis_f17
Expand Down Expand Up @@ -53,6 +53,17 @@
order: 2
- name: scan_angle
var_name: sensorScanPosition
covariance:
minimal required obs number: 20
variance range: [1.0e-6, 10.0]
step size: 1.0e-4
largest analysis variance: 10000.0
prior:
input file: '{{cycle_dir}}/ssmis_f17.{{background_time}}.satbias.nc4'
inflation:
ratio: 1.1
ratio for small dataset: 2.0
output file: '{{cycle_dir}}/ssmis_f17.{{window_begin}}.satbias.nc4'

obs prior filters:
# Step 1: Initial Observation Error Assignment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,11 +122,11 @@ satwind:

scatwind:
filter_test:
passedBenchmark: 16384
passedBenchmark: 16262

sfcship:
filter_test:
passedBenchmark: 99142
passedBenchmark: 99068

sfc:
filter_test:
Expand Down
Loading

0 comments on commit 0dd142d

Please sign in to comment.