Skip to content

Commit

Permalink
Merge branch 'feature/rename_atm' of https://github.com/NOAA-EMC/GDASApp
Browse files Browse the repository at this point in the history
 into feature/rename_atm

* 'feature/rename_atm' of https://github.com/NOAA-EMC/GDASApp:
  Feature/rtofs in situ (#1138)
  Updates to aerosol yaml templates (#1158)
  Use standard config files for jjob test and give output files better names (#1156)
  Temporary removal of soca_vrfy task (#1157)
  Fix keyword for float tolerances in jjob tests (#1154)
  Create template YAML for n21 aerosol obs and update obs QC in YAMLs (#1152)
  Changes name of rossrad file for letkf (#1151)
  Adds staging jinja/yaml file for letkf task (#1137)
  • Loading branch information
danholdaway committed Jun 13, 2024
2 parents 9a3a029 + 3d5f205 commit fe5169c
Show file tree
Hide file tree
Showing 52 changed files with 1,244 additions and 709 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/norms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
- name: Run C++ linter on utils
run: |
cd $GITHUB_WORKSPACE/GDASApp/utils/test/
./cpplint.py --quiet --recursive $GITHUB_WORKSPACE/GDASApp/utils
./cpplint.py --quiet --recursive --exclude=$GITHUB_WORKSPACE/GDASApp/utils/obsproc/rtofs/*.cc $GITHUB_WORKSPACE/GDASApp/utils
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ cmake_minimum_required( VERSION 3.20 FATAL_ERROR )
find_package(ecbuild 3.5 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)

project(GDASApp VERSION 1.0.0 LANGUAGES C CXX Fortran )
# include_directories(${CMAKE_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

include(GNUInstallDirs)
enable_testing()
Expand Down
4 changes: 2 additions & 2 deletions parm/aero/berror/aero_diagb.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ rescale: 2.0 # rescales the filtered std. dev. by "rescale"
number of halo points: 4
number of neighbors: 16
simple smoothing:
horizontal iterations: 2
vertical iterations: 1
horizontal iterations: 0
vertical iterations: 0
File renamed without changes.
7 changes: 7 additions & 0 deletions parm/aero/obs/config/viirs_n20_aod.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,18 @@
obs filters:
- filter: PreQC
maxvalue: 1
- filter: Domain Check
where:
- variable:
name: latitude@MetaData
minvalue: -60
maxvalue: 60
- filter: Bounds Check
filter variables:
- name: aerosolOpticalDepth
channels: 4
minvalue: 0
maxvalue: 4.9
action:
name: reject
- filter: Background Check
Expand Down
50 changes: 50 additions & 0 deletions parm/aero/obs/config/viirs_n21_aod.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
- obs space:
name: viirs_n21_aod
obsdatain:
engine:
type: H5File
obsfile: "{{ DATA }}/obs/{{ OPREFIX }}viirs_n21.{{ current_cycle | to_YMDH }}.nc4"
obsdataout:
engine:
type: H5File
obsfile: "{{ DATA }}/diags/diag_viirs_n21_{{ current_cycle | to_YMDH }}.nc4"
io pool:
max pool size: 1
simulated variables: [aerosolOpticalDepth]
channels: 4
get values:
interpolation method: barycentric
time interpolation: linear
obs operator:
name: AodCRTM
Absorbers: [H2O,O3]
obs options:
Sensor_ID: v.viirs-m_j2
EndianType: little_endian
CoefficientPath: "{{ DATA }}/crtm/"
AerosolOption: aerosols_gocart_default
obs error:
covariance model: diagonal
obs filters:
- filter: PreQC
maxvalue: 1
- filter: Domain Check
where:
- variable:
name: latitude@MetaData
minvalue: -60
maxvalue: 60
- filter: Bounds Check
filter variables:
- name: aerosolOpticalDepth
channels: 4
minvalue: 0
maxvalue: 4.9
action:
name: reject
- filter: Background Check
channels: 4
threshold: 3.0
action:
name: inflate error
inflation factor: 3.0
7 changes: 7 additions & 0 deletions parm/aero/obs/config/viirs_npp_aod.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,18 @@
obs filters:
- filter: PreQC
maxvalue: 1
- filter: Domain Check
where:
- variable:
name: latitude@MetaData
minvalue: -60
maxvalue: 60
- filter: Bounds Check
filter variables:
- name: aerosolOpticalDepth
channels: 4
minvalue: 0
maxvalue: 4.9
action:
name: reject
- filter: Background Check
Expand Down
1 change: 1 addition & 0 deletions parm/aero/obs/lists/gdas_aero.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ observers:
{% filter indent(width=2) %}
{% include 'aero/obs/config/viirs_n20_aod.yaml.j2' %}
{% include 'aero/obs/config/viirs_npp_aod.yaml.j2' %}
{% include 'aero/obs/config/viirs_n21_aod.yaml.j2' %}
{% endfilter %}
8 changes: 4 additions & 4 deletions parm/soca/letkf/letkf.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ geometry:
fields metadata: fields_metadata.yaml

time window:
begin: &date '{{ ATM_WINDOW_BEGIN }}'
begin: &date '{{ WINDOW_BEGIN | to_isotime }}'
length: PT6H

background:
members from template:
template:
date: '{{ ATM_WINDOW_MIDDLE }}'
ocn_filename: enkfgdas.ocean.t06z.inst.f009.nc
ice_filename: enkfgdas.ice.t06z.inst.f009.nc
date: '{{ WINDOW_MIDDLE | to_isotime }}'
ocn_filename: "{{ GDUMP_ENS }}.ocean.t{{ gcyc }}z.inst.f006.nc"
ice_filename: "{{ GDUMP_ENS }}.ice.t{{ gcyc }}z.inst.f006.nc"
read_from_file: 1
basename: ./ens/mem%mem%
state variables: [socn, tocn, ssh, uocn, vocn, cicen]
Expand Down
49 changes: 49 additions & 0 deletions parm/soca/letkf/letkf_stage.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
######################################
# set some variables
######################################
{% set gPDY = previous_cycle | to_YMD %}
{% set gcyc = previous_cycle | strftime("%H") %}
{% set PDY = current_cycle | to_YMD %}
{% set cyc = current_cycle | strftime("%H") %}
######################################
# create working directories
######################################
mkdir:
- "{{ DATA }}/Data"
- "{{ DATA }}/obs"
- "{{ DATA }}/INPUT"
{% for mem in range(1, NMEM_ENS + 1) %}
- "{{ DATA }}/ens/mem{{ '%03d' % mem }}"
{% endfor %}
copy:
######################################
# copy mom input template
######################################
- ["{{ PARMgfs }}/gdas/soca/fms/input.nml", "{{ DATA }}/mom_input.nml.tmpl"]
######################################
# copy ensemble background files
######################################
{% for mem in range(1, NMEM_ENS + 1) %}
# define variables
# Declare a dict of search and replace terms to GDUMP on each template
{% set tmpl_dict = {'ROTDIR':ROTDIR,
'RUN': GDUMP_ENS,
'YMD':gPDY,
'HH':gcyc,
'MEMDIR':"mem" + '%03d' % mem} %}

# Replace template variables with tmpl_dict, one key at a time
# This must be done in a namespace to overcome jinja scoping
# Variables set inside of a for loop are lost at the end of the loop
# unless they are part of a namespace
{% set com_prev_ocn = namespace(COM_OCEAN_HISTORY_MEM = COM_OCEAN_HISTORY_TMPL) %}
{% set com_prev_ice = namespace(COM_ICE_HISTORY_MEM = COM_ICE_HISTORY_TMPL) %}
{% for key in tmpl_dict.keys() %}
{% set search_term = '${' + key + '}' %}
{% set replace_term = tmpl_dict[key] %}
{% set com_prev_ocn.COM_OCEAN_HISTORY_MEM = com_prev_ocn.COM_OCEAN_HISTORY_MEM.replace(search_term, replace_term) %}
{% set com_prev_ice.COM_ICE_HISTORY_MEM = com_prev_ice.COM_ICE_HISTORY_MEM.replace(search_term, replace_term) %}
{% endfor %}
- ["{{ com_prev_ocn.COM_OCEAN_HISTORY_MEM }}/{{ GDUMP_ENS }}.ocean.t{{ gcyc }}z.inst.f006.nc", "{{ DATA }}/ens/mem{{ '%03d' % mem }}/{{ GDUMP_ENS }}.ocean.t{{ gcyc }}z.inst.f006.nc"]
- ["{{ com_prev_ice.COM_ICE_HISTORY_MEM }}/{{ GDUMP_ENS }}.ice.t{{ gcyc }}z.inst.f006.nc", "{{ DATA }}/ens/mem{{ '%03d' % mem }}/{{ GDUMP_ENS }}.ice.t{{ gcyc }}z.inst.f006.nc"]
{% endfor %}
16 changes: 16 additions & 0 deletions parm/soca/letkf/soca_fix_stage.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
######################################
# fix files to copy
######################################
copy:
- ["{{ SOCA_INPUT_FIX_DIR }}/rossrad.nc", "{{ DATA }}/rossrad.nc"]
- ["{{ SOCA_INPUT_FIX_DIR }}/field_table", "{{ DATA }}/field_table"]
- ["{{ SOCA_INPUT_FIX_DIR }}/diag_table", "{{ DATA }}/diag_table"]
- ["{{ SOCA_INPUT_FIX_DIR }}/MOM_input", "{{ DATA }}/MOM_input"]
- ["{{ SOCA_INPUT_FIX_DIR }}/fields_metadata.yaml", "{{ DATA }}/fields_metadata.yaml"]
- ["{{ SOCA_INPUT_FIX_DIR }}/obsop_name_map.yaml", "{{ DATA }}/obsop_name_map.yaml"]
- ["{{ SOCA_INPUT_FIX_DIR }}/INPUT/grid_spec.nc", "{{ DATA }}/INPUT/grid_spec.nc"]
- ["{{ SOCA_INPUT_FIX_DIR }}/INPUT/hycom1_25.nc", "{{ DATA }}/INPUT/hycom1_25.nc"]
- ["{{ SOCA_INPUT_FIX_DIR }}/INPUT/layer_coord25.nc", "{{ DATA }}/INPUT/layer_coord25.nc"]
- ["{{ SOCA_INPUT_FIX_DIR }}/INPUT/ocean_hgrid.nc", "{{ DATA }}/INPUT/ocean_hgrid.nc"]
- ["{{ SOCA_INPUT_FIX_DIR }}/INPUT/ocean_mosaic.nc", "{{ DATA }}/INPUT/ocean_mosaic.nc"]
- ["{{ SOCA_INPUT_FIX_DIR }}/INPUT/ocean_topog.nc", "{{ DATA }}/INPUT/ocean_topog.nc"]
2 changes: 1 addition & 1 deletion sorc/fv3
Submodule fv3 updated 1 files
+3 −1 CMakeLists.txt
2 changes: 1 addition & 1 deletion sorc/gsw
2 changes: 1 addition & 1 deletion sorc/land-imsproc
2 changes: 1 addition & 1 deletion sorc/land-jediincr
35 changes: 0 additions & 35 deletions test/atm/global-workflow/config.atmanl

This file was deleted.

24 changes: 0 additions & 24 deletions test/atm/global-workflow/config.atmensanl

This file was deleted.

4 changes: 2 additions & 2 deletions test/atm/global-workflow/jcb-prototype_3dvar.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ atmosphere_obsdatain_suffix: ".{{ current_cycle | to_YMDH }}.nc"
# --------------
test_reference_filename: {{ HOMEgfs }}/sorc/gdas.cd/test/atm/global-workflow/3dvar.ref
test_output_filename: ./3dvar.out
float_relative_tolerance: 1.0e-3
float_absolute_tolerance: 1.0e-5
test_float_relative_tolerance: 1.0e-3
test_float_absolute_tolerance: 1.0e-5
4 changes: 2 additions & 2 deletions test/atm/global-workflow/jcb-prototype_lgetkf.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ atmosphere_obsdatain_suffix: ".{{ current_cycle | to_YMDH }}.nc"
# --------------
test_reference_filename: {{ HOMEgfs }}/sorc/gdas.cd/test/atm/global-workflow/lgetkf.ref
test_output_filename: ./lgetkf.out
float_relative_tolerance: 1.0e-3
float_absolute_tolerance: 1.0e-5
test_float_relative_tolerance: 1.0e-3
test_float_absolute_tolerance: 1.0e-5
6 changes: 2 additions & 4 deletions test/atm/global-workflow/jjob_ens_final.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
fi

# Execute j-job
if [[ $machine = 'HERA' ]]; then
sbatch --ntasks=1 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_FINALIZE
elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --ntasks=1 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_FINALIZE
if [[ $machine = 'HERA' || $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --ntasks=1 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait --output=atmensanlfinal-%j.out ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_FINALIZE
else
${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_FINALIZE
fi
6 changes: 2 additions & 4 deletions test/atm/global-workflow/jjob_ens_inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
fi

# Execute j-job
if [[ $machine = 'HERA' ]]; then
sbatch --nodes=1 --ntasks=36 --account=$ACCOUNT --qos=batch --time=00:30:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_FV3_INCREMENT
elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --nodes=1 --ntasks=36 --account=$ACCOUNT --qos=batch --time=00:30:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_FV3_INCREMENT
if [[ $machine = 'HERA' || $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --nodes=1 --ntasks=36 --account=$ACCOUNT --qos=batch --time=00:30:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_FV3_INCREMENT --job-name=atmensanlfv3inc-%j.out
else
${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_FV3_INCREMENT
fi
6 changes: 2 additions & 4 deletions test/atm/global-workflow/jjob_ens_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,8 @@ for imem in $(seq 1 $NMEM_ENS); do
done

# Execute j-job
if [[ $machine = 'HERA' ]]; then
sbatch --ntasks=1 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_INITIALIZE
elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --ntasks=1 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_INITIALIZE
if [[ $machine = 'HERA' || $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --ntasks=1 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait --output=atmensanlinit-%j.out ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_INITIALIZE
else
${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_INITIALIZE
fi
6 changes: 2 additions & 4 deletions test/atm/global-workflow/jjob_ens_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
fi

# Execute j-job
if [[ $machine = 'HERA' ]]; then
sbatch --nodes=1 --ntasks=36 --account=$ACCOUNT --qos=batch --time=00:30:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_LETKF
elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --nodes=1 --ntasks=36 --account=$ACCOUNT --qos=batch --time=00:30:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_LETKF
if [[ $machine = 'HERA' || $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --nodes=1 --ntasks=36 --account=$ACCOUNT --qos=batch --time=00:30:00 --export=ALL --wait --output=atmensanlletkf-%j.out ${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_LETKF
else
${HOMEgfs}/jobs/JGLOBAL_ATMENS_ANALYSIS_LETKF
fi
6 changes: 2 additions & 4 deletions test/atm/global-workflow/jjob_var_final.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
fi

# Execute j-job
if [[ $machine = 'HERA' ]]; then
sbatch --ntasks=1 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_FINALIZE
elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --ntasks=1 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_FINALIZE
if [[ $machine = 'HERA' || $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --ntasks=1 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait --output=atmanlfinal-%j.out ${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_FINALIZE
else
${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_FINALIZE
fi
6 changes: 2 additions & 4 deletions test/atm/global-workflow/jjob_var_inc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@ elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
fi

# Execute j-job
if [[ $machine = 'HERA' ]]; then
sbatch --ntasks=6 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_FV3_INCREMENT
elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --ntasks=6 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_FV3_INCREMENT
if [[ $machine = 'HERA' || $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --ntasks=6 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait --output=atmanlfv3inc-%j.out ${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_FV3_INCREMENT
else
${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_FV3_INCREMENT
fi
6 changes: 2 additions & 4 deletions test/atm/global-workflow/jjob_var_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,8 @@ done


# Execute j-job
if [[ $machine = 'HERA' ]]; then
sbatch --ntasks=1 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_INITIALIZE
elif [[ $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --ntasks=1 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait ${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_INITIALIZE
if [[ $machine = 'HERA' || $machine = 'ORION' || $machine = 'HERCULES' ]]; then
sbatch --ntasks=1 --account=$ACCOUNT --qos=batch --time=00:10:00 --export=ALL --wait --output=atmanlinit-%j.out ${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_INITIALIZE
else
${HOMEgfs}/jobs/JGLOBAL_ATM_ANALYSIS_INITIALIZE
fi
Loading

0 comments on commit fe5169c

Please sign in to comment.