Skip to content

Commit

Permalink
Update Submodules in HDASApp (#25)
Browse files Browse the repository at this point in the history
As stated in issue #23 , this PR is created to update the submodules in
HDASApp.
Besides that, the corresponding Cmake files as well as module files are
also updated.
The yaml files inside hafs-test are updated as well to reflect the
updates in fv3-jedi and UFO variable name changes.
  • Loading branch information
JingCheng-NOAA authored Dec 20, 2024
1 parent 6cd421f commit 74f5c80
Show file tree
Hide file tree
Showing 20 changed files with 623 additions and 23 deletions.
15 changes: 14 additions & 1 deletion bundle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ set( ENABLE_MPI ON CACHE BOOL "Compile with MPI" )
option(BUILD_HDASBUNDLE "Build HDAS Bundle" ON)
option(CLONE_JCSDADATA "Clone JCSDA test data repositories" OFF)

# Depend path for non-ecbuild packages
set(DEPEND_LIB_ROOT ${CMAKE_CURRENT_BINARY_DIR}/Depends)
list(APPEND CMAKE_PREFIX_PATH ${DEPEND_LIB_ROOT})

# Library path for non-ecbuild packages
link_directories(${CMAKE_CURRENT_BINARY_DIR}/lib)

include( GNUInstallDirs )
if(APPLE)
list( APPEND CMAKE_INSTALL_RPATH $ENV{llvm_openmp_ROOT}/lib )
endif()
list( APPEND CMAKE_INSTALL_RPATH ${CMAKE_CURRENT_BINARY_DIR}/fv3 )

# Initialize bundle
# -----------------
ecbuild_bundle_initialize()
Expand Down Expand Up @@ -75,7 +88,7 @@ if(BUILD_HDASBUNDLE)
ecbuild_bundle( PROJECT ufo SOURCE "../sorc/ufo" )

# FMS and FV3 dynamical core
ecbuild_bundle( PROJECT fms SOURCE "../sorc/fms" )
include(fv3-interface.cmake)
ecbuild_bundle( PROJECT fv3 SOURCE "../sorc/fv3" )

# fv3-jedi and associated repositories
Expand Down
1 change: 1 addition & 0 deletions hafs-test/scripts/setup_experiment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ fi
mkdir -p testinput
mkdir -p Data/obs
cp -rp $YOUR_PATH_TO_HDASAPP/hafs-test/validated_yamls/* testinput
cp -rp $YOUR_PATH_TO_HDASAPP/hafs-test/testinput/* testinput
cp -p ${DATA_STAGE}/obs/* Data/obs/.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ cost function:
namelist filename: DataFix/fmsmpp.nml
field table filename: DataFix/field_table
<<: *geometry_configs
analysis variables: &ana_vars [eastward_wind,northward_wind,air_temperature,air_pressure_thickness,specific_humidity,cloud_liquid_ice,cloud_liquid_water,ozone_mass_mixing_ratio]
analysis variables: &ana_vars [eastward_wind,northward_wind,air_temperature,air_pressure_thickness,water_vapor_mixing_ratio_wrt_moist_air,cloud_liquid_ice,cloud_liquid_water,ozone_mass_mixing_ratio]


background:
datetime: &AnaDate '2020-08-25T12:00:00Z'
filetype: fms restart
datapath: Data/bkg
<<: *fv3file_names
state variables: &state_vars [eastward_wind,northward_wind,air_temperature,air_pressure_thickness,specific_humidity,cloud_liquid_ice,cloud_liquid_water,ozone_mass_mixing_ratio,phis,slmsk,sheleg,tsea,vtype,stype,vfrac,stc,smc,snwdph,u_srf,v_srf,f10m]
state variables: &state_vars [eastward_wind,northward_wind,air_temperature,air_pressure_thickness,water_vapor_mixing_ratio_wrt_moist_air,cloud_liquid_ice,cloud_liquid_water,ozone_mass_mixing_ratio,phis,slmsk,sheleg,vtype,stype,vfrac,stc,smc,snwdph,u_srf,v_srf,f10m]
background error:
covariance model: ensemble
members from template:
Expand Down
4 changes: 2 additions & 2 deletions hafs-test/testinput/hafs_fv3jedi_3DEnVar_2024063012.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ cost function:
namelist filename: DataFix/fmsmpp.nml
field table filename: DataFix/field_table
<<: *geometry_configs
analysis variables: &ana_vars [eastward_wind,northward_wind,air_temperature,air_pressure_thickness,specific_humidity,cloud_liquid_ice,cloud_liquid_water,ozone_mass_mixing_ratio]
analysis variables: &ana_vars [eastward_wind,northward_wind,air_temperature,air_pressure_thickness,water_vapor_mixing_ratio_wrt_moist_air,cloud_liquid_ice,cloud_liquid_water,ozone_mass_mixing_ratio]

background:
datetime: &AnaDate '2024-06-30T12:00:00Z'
filetype: fms restart
datapath: Data/bkg
<<: *fv3file_names
state variables: &state_vars [eastward_wind,northward_wind,air_temperature,air_pressure_thickness,specific_humidity,cloud_liquid_ice,cloud_liquid_water,ozone_mass_mixing_ratio,phis,slmsk,sheleg,tsea,vtype,stype,vfrac,stc,smc,snwdph,u_srf,v_srf,f10m]
state variables: &state_vars [eastward_wind,northward_wind,air_temperature,air_pressure_thickness,water_vapor_mixing_ratio_wrt_moist_air,cloud_liquid_ice,cloud_liquid_water,ozone_mass_mixing_ratio,phis,slmsk,sheleg,vtype,stype,vfrac,stc,smc,snwdph,u_srf,v_srf,f10m]
background error:
covariance model: ensemble
members from template:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
_filenames: &fv3file_names
filename_core: '20200825.120000.fv_core.res.tile1.nc'
filename_trcr: '20200825.120000.fv_tracer.res.tile1.nc'
filename_sfcd: '20200825.120000.sfc_data.nc'
filename_sfcw: '20200825.120000.fv_srf_wnd.res.tile1.nc'
filename_cplr: '20200825.120000.coupler.res'

_geometry: &geometry_configs
namelist filename: DataFix/input_hafs.nml
field metadata override: Data/fieldmetadata/gfs-restart.yaml
akbk: DataFix/fix/akbk65.nc
npx: 721
npy: 541
npz: 65
layout: [10,6]
io_layout: [1,1]
ntiles: 1
fms initialization:
namelist filename: DataFix/fmsmpp.nml
field table filename: DataFix/field_table
fieldsets:
fieldset: DataFix/dynamics_lam_cmaq.yaml

cost function:
cost type: 3D-Var
time window:
begin: &InitialDate '2020-08-25T09:00:00Z'
length: PT6H

geometry:
<<: *geometry_configs
analysis variables: &ana_vars [eastward_wind,northward_wind,air_temperature,air_pressure_thickness,water_vapor_mixing_ratio_wrt_moist_air,cloud_liquid_ice,cloud_liquid_water,ozone_mass_mixing_ratio]
background:
datetime: &AnaDate '2020-08-25T12:00:00Z'
filetype: fms restart
datapath: Data/bkg
<<: *fv3file_names
state variables: &state_vars [eastward_wind,northward_wind,air_temperature,air_pressure_thickness,water_vapor_mixing_ratio_wrt_moist_air,cloud_liquid_ice,cloud_liquid_water,ozone_mass_mixing_ratio,phis,slmsk,sheleg,vtype,stype,vfrac,stc,smc,snwdph,u_srf,v_srf,f10m]
background error:
covariance model: ensemble
members from template:
template:
datetime: *AnaDate
filetype: fms restart
state variables: *state_vars
datapath: ens/mem%mem%/
<<: *fv3file_names
pattern: '%mem%'
nmembers: 5
zero padding: 3
localization:
localization method: SABER
saber central block:
saber block name: BUMP_NICAS
active variables: *ana_vars
read:
io:
data directory: Data/bump
files prefix: fv3jedi_bumpparameters_nicas_lam_atm
alias:
- in code: common
in file: t_250km
drivers:
multivariate strategy: duplicated
read local nicas: true

#------------------------------------------------------------------------------
observations:
observers:
- obs space:
name: sfcshp
obsdatain:
engine:
type: H5File
obsfile: Data/obs/sfcshp.tm00.singleob.nc
obsdataout:
engine:
type: H5File
obsfile: diag_SFCSHP.prepbufr_singleobs.nc
allow overwrite: true
io pool:
max pool size: 1
observed variables: [airTemperature]
simulated variables: [airTemperature]

obs operator:
name: Composite
components:
- name: VertInterp
vertical coordinate: air_pressure
observation vertical coordinate: pressure
observation vertical coordinate group: MetaData
interpolation method: log-linear
variables:
- name: airTemperature

obs post filters:
- filter: Perform Action
filter variables:
- name: airTemperature
where:
- variable: ObsType/airTemperature
is_in: 180
action:
name: assign error
error parameter: 0.92823
defer to post: true
# Adjusted error after initial assignment (qcmod.f90)
- filter: Perform Action
filter variables:
- name: airTemperature
where:
- variable: ObsType/airTemperature
is_in: 180
action:
name: inflate error
inflation variable:
name: ObsFunction/ObsErrorFactorConventional
options:
test QCflag: PreQC
test QCthreshold: 3
inflate variables: [airTemperature]
pressure: MetaData/pressure
distance threshold: -1.
defer to post: true
# error inflation based on pressure check
- filter: Perform Action
filter variables:
- name: airTemperature
where:
- variable: ObsType/airTemperature
is_in: 180
action:
name: inflate error
inflation variable:
name: ObsFunction/ObsErrorFactorPressureCheck
options:
variable: airTemperature
inflation factor: 8.0
geovar_sfc_geomz: surface_geometric_height
defer to post: true
#- filter: Bounds Check
# filter variables:
# - name: airTemperature
# minvalue: 195.0
# maxvalue: 327.0
# action:
# name: reject
#- filter: Background Check
# filter variables:
# - name: airTemperature
# threshold: 7.0
# absolute threshold: 9.0
# action:
# name: reject
# defer to post: true

variational:
minimizer:
algorithm: DRPCG # Derber-Rosati Conjugate Gradients
iterations:
- ninner: 50
gradient norm reduction: 1e-60
geometry:
<<: *geometry_configs
diagnostics:
departures: bkgmob
final:
diagnostics:
departures: oman

output:
filetype: fms restart
datapath: Data/analysis/
prefix: envar-fv3_hafs_singleOBS_sfcshp #Ens3dvar-fv3_lam-C775
frequency: PT3H

Loading

0 comments on commit 74f5c80

Please sign in to comment.