Skip to content

Commit

Permalink
Merge branch 'develop' into feature/madis_ops
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaruidong2017 committed Jan 14, 2024
2 parents 74c4e78 + cc4c940 commit 1a0da00
Show file tree
Hide file tree
Showing 117 changed files with 1,466 additions and 2,383 deletions.
9 changes: 0 additions & 9 deletions .github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,6 @@ jobs:
pip install netCDF4
pip install xarray
- name: Install other dependencies
run: |
wget https://ftp.emc.ncep.noaa.gov/static_files/public/GDASApp/r2d2-bb361c2.tar.gz
wget https://ftp.emc.ncep.noaa.gov/static_files/public/GDASApp/solo-877b414.tar.gz
tar -xvf r2d2-bb361c2.tar.gz
tar -xvf solo-877b414.tar.gz
cd solo && pip install . && cd ..
cd r2d2 && pip install . && cd ..
- name: Checkout wxflow
uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ while getopts "p:t:c:hvdfa" opt; do
done

case ${BUILD_TARGET} in
hera | orion)
hera | orion | hercules)
echo "Building GDASApp on $BUILD_TARGET"
source $dir_root/ush/module-setup.sh
module use $dir_root/modulefiles
Expand Down
1 change: 0 additions & 1 deletion modulefiles/GDAS/hera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ local mpinproc = '-n'
setenv('MPIEXEC_EXEC', mpiexec)
setenv('MPIEXEC_NPROC', mpinproc)

setenv('R2D2_CONFIG', '/scratch1/NCEPDEV/stmp4/Cory.R.Martin/R2D2_SHARED/config_hera.yaml')
setenv("CRTM_FIX","/scratch1/NCEPDEV/da/Cory.R.Martin/GDASApp/fix/crtm/2.4.0")
setenv("GDASAPP_TESTDATA","/scratch1/NCEPDEV/da/Cory.R.Martin/CI/GDASApp/data")
prepend_path("PATH","/scratch2/NCEPDEV/nwprod/hpc-stack/libs/hpc-stack/intel-18.0.5.274/prod_util/1.2.2/bin")
Expand Down
98 changes: 98 additions & 0 deletions modulefiles/GDAS/hercules.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
help([[
Load environment for running the GDAS application with Intel compilers and MPI.
]])

local pkgName = myModuleName()
local pkgVersion = myModuleVersion()
local pkgNameVer = myModuleFullName()

prepend_path("MODULEPATH", '/work/noaa/epic/role-epic/spack-stack/hercules/spack-stack-1.5.1/envs/unified-env/install/modulefiles/Core')
prepend_path("MODULEPATH", '/work2/noaa/da/python/opt/modulefiles/stack')

-- below two lines get us access to the spack-stack modules
load("stack-intel/2021.9.0")
load("stack-intel-oneapi-mpi/2021.9.0")
--load("stack-python/3.10.8")
-- JCSDA has 'jedi-fv3-env/unified-dev', but we should load these manually as needed
load("cmake/3.23.1")
load("curl/8.1.2")
load("zlib/1.2.13")
load("git/2.40.0")
--load("pkg-config/0.27.1")
load("hdf5/1.14.0")
load("parallel-netcdf/1.12.2")
load("netcdf-c/4.9.2")
load("nccmp/1.9.0.1")
load("netcdf-fortran/4.6.0")
load("nco/5.0.6")
load("parallelio/2.5.10")
load("wget/1.21.1")
load("boost/1.78")
load("bufr/12.0.1")
load("git-lfs/3.1.2")
load("ecbuild/3.7.2")
load("openjpeg/2.4.0")
load("eccodes/2.27.0")
load("eigen/3.4.0")
load("openblas/0.3.19")
load("eckit/1.24.4")
load("fftw/3.3.10")
load("fckit/0.11.0")
load("fiat/1.2.0")
load("ectrans/1.2.0")
load("atlas/0.35.0")
load("sp/2.3.3")
load("gsl-lite/0.37.0")
load("libjpeg/2.1.0")
load("krb5/1.20.1")
load("libtirpc/1.2.6")
load("hdf/4.2.15")
load("jedi-cmake/1.4.0")
load("libpng/1.6.37")
load("libxt/1.1.5")
load("libxmu/1.1.4")
load("libxpm/3.5.12")
load("libxaw/1.0.13")
load("udunits/2.2.28")
load("ncview/2.1.8")
load("netcdf-cxx4/4.3.1")
load("py-pybind11/2.8.1")
--load("crtm/v2.4_jedi")
load("contrib/0.1")
load("noaatools/3.1")
load("rocoto/1.3.5")

load("hpc/1.2.0")
unload("python/3.10.8")
unload("python/3.9.2")
load("miniconda3/4.6.14")
load("gdasapp/1.0.0")

load("boost/1.78.0")
load("bufr/12.0.1")
load("fckit/0.11.0")
load("atlas/0.35.0")
load("py-pybind11/2.8.1")

-- below is a hack because of cmake finding the wrong python...
setenv("CONDA_PREFIX", "/work2/noaa/da/python/opt/core/miniconda3/4.6.14/envs/gdasapp/")

setenv("CC","mpiicc")
setenv("FC","mpiifort")
setenv("CXX","mpiicpc")
local mpiexec = '/opt/slurm/bin/srun'
local mpinproc = '-n'
setenv('MPIEXEC_EXEC', mpiexec)
setenv('MPIEXEC_NPROC', mpinproc)

setenv('R2D2_CONFIG', '/work2/noaa/da/cmartin/GDASApp/R2D2_SHARED/config_orion.yaml')
setenv("CRTM_FIX","/work2/noaa/da/cmartin/GDASApp/fix/crtm/2.4.0")
setenv("GDASAPP_TESTDATA","/work2/noaa/da/cmartin/CI/GDASApp/data")
prepend_path("PATH","/apps/contrib/NCEP/libs/hpc-stack/intel-2018.4/prod_util/1.2.2/bin")

execute{cmd="ulimit -s unlimited",modeA={"load"}}

whatis("Name: ".. pkgName)
whatis("Version: ".. pkgVersion)
whatis("Category: GDASApp")
whatis("Description: Load all libraries needed for GDASApp")
1 change: 0 additions & 1 deletion modulefiles/GDAS/orion.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ local mpinproc = '-n'
setenv('MPIEXEC_EXEC', mpiexec)
setenv('MPIEXEC_NPROC', mpinproc)

setenv('R2D2_CONFIG', '/work2/noaa/da/cmartin/GDASApp/R2D2_SHARED/config_orion.yaml')
setenv("CRTM_FIX","/work2/noaa/da/cmartin/GDASApp/fix/crtm/2.4.0")
setenv("GDASAPP_TESTDATA","/work2/noaa/da/cmartin/CI/GDASApp/data")
prepend_path("PATH","/apps/contrib/NCEP/libs/hpc-stack/intel-2018.4/prod_util/1.2.2/bin")
Expand Down
1 change: 1 addition & 0 deletions parm/land/letkfoi/letkfoi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ geometry:
time window:
begin: '{{ LAND_WINDOW_BEGIN | to_isotime }}'
length: $(LAND_WINDOW_LENGTH)
bound to include: begin

background:
datetime: '{{ current_cycle | to_isotime }}'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
obs space:
name: adt_all
name: adt_rads_all
obsdatain:
engine:
type: H5File
obsfile: !ENV ${DATA}/obs/${OPREFIX}adt_all.${PDY}${cyc}.nc4
obsfile: !ENV ${DATA}/obs/${OPREFIX}adt_rads_all.${PDY}${cyc}.nc4
obsdataout:
engine:
type: H5File
obsfile: !ENV ${DATA}/diags/adt_all.${PDY}${cyc}.nc4
obsfile: !ENV ${DATA}/diags/adt_rads_all.${PDY}${cyc}.nc4
simulated variables: [absoluteDynamicTopography]
io pool:
max pool size: 1
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion parm/soca/obs/config/obs_list.yaml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
obs space:
name: sst_metopb_l3u_so025
name: sst_metopb_l3u
obsdatain:
engine:
type: H5File
obsfile: !ENV ${DATA}/obs/${OPREFIX}sst_metopb_l3u_so025.${PDY}${cyc}.nc4
obsfile: !ENV ${DATA}/obs/${OPREFIX}sst_metopb_l3u.${PDY}${cyc}.nc4
obsdataout:
engine:
type: H5File
obsfile: !ENV ${DATA}/diags/sst_metopb_l3u_so025.${PDY}${cyc}.nc4
obsfile: !ENV ${DATA}/diags/sst_metopb_l3u.${PDY}${cyc}.nc4
simulated variables: [seaSurfaceTemperature]
io pool:
max pool size: 1
Expand Down
25 changes: 4 additions & 21 deletions parm/soca/obs/obs_list.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
observers:
- !INC ${OBS_YAML_DIR}/adt_all.yaml
- !INC ${OBS_YAML_DIR}/adt_j3_egm2008.yaml
- !INC ${OBS_YAML_DIR}/adt_3a_egm2008.yaml
- !INC ${OBS_YAML_DIR}/adt_3b_egm2008.yaml
- !INC ${OBS_YAML_DIR}/adt_c2_egm2008.yaml
- !INC ${OBS_YAML_DIR}/adt_sa_egm2008.yaml
- !INC ${OBS_YAML_DIR}/sst_viirs_npp_l3u_so025.yaml
#- !INC ${OBS_YAML_DIR}/sst_metopa_l3u_so025.yaml
#- !INC ${OBS_YAML_DIR}/sst_metopb_l3u_so025.yaml
#- !INC ${OBS_YAML_DIR}/sst_metopc_l3u_so025.yaml
- !INC ${OBS_YAML_DIR}/icec_ssmis_f17_north.yaml
#- !INC ${OBS_YAML_DIR}/icec_ssmis_f17_south.yaml
#- !INC ${OBS_YAML_DIR}/icec_ssmis_f18_north.yaml
- !INC ${OBS_YAML_DIR}/icec_ssmis_f18_south.yaml
#- !INC ${OBS_YAML_DIR}/temp_profile_argo.yaml
#- !INC ${OBS_YAML_DIR}/temp_profile_bathy.yaml
#- !INC ${OBS_YAML_DIR}/temp_profile_glider.yaml
#- !INC ${OBS_YAML_DIR}/temp_profile_tesac.yaml
#- !INC ${OBS_YAML_DIR}/salt_profile_argo.yaml
#- !INC ${OBS_YAML_DIR}/salt_profile_glider.yaml
#- !INC ${OBS_YAML_DIR}/salt_profile_tesac.yaml
- !INC ${OBS_YAML_DIR}/adt_rads_all.yaml
- !INC ${OBS_YAML_DIR}/sst_metopb_l3u.yaml
- !INC ${OBS_YAML_DIR}/icec_amsr2_north.yaml
- !INC ${OBS_YAML_DIR}/icec_amsr2_south.yaml
8 changes: 0 additions & 8 deletions parm/soca/obs/obs_list_small.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions parm/soca/obsproc/obs_list_obsproc.yaml

This file was deleted.

24 changes: 20 additions & 4 deletions parm/soca/obsproc/obsproc_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,30 @@ observations:
output file: sss_smos.ioda.nc
obsproc regex: SM_OPER_MIR_OSUDP2_????????T??????_????????T??????_700_001_1.nc
- obs space:
name: adt_3b_egm2008
name: adt_rads_all
obsproc subdir: ADT
obsproc regex: rads_adt_3b_???????.nc
obsproc regex: rads_adt_??_???????.nc
provider: RADS
output file: adt_all.nc4
output file: adt_rads_all.nc4
- obs space:
name: icec_amsr2_north
provider: AMSR2
obsproc subdir: icec
output file: icec_amsr2_north_1.ioda.nc
output file: icec_amsr2_north.ioda.nc
obsproc regex: AMSR2-SEAICE-NH_v2r2_GW1_s???????????????_e???????????????_c???????????????.nc
- obs space:
name: icec_amsr2_south
provider: AMSR2
obsproc subdir: icec
output file: icec_amsr2_south.ioda.nc
obsproc regex: AMSR2-SEAICE-SH_v2r2_GW1_s???????????????_e???????????????_c???????????????.nc
- obs space:
name: sst_metopb_l3u
provider: GHRSST
obsproc subdir: 'sst'
output file: sst_metopb_l3u.ioda.nc
obsproc regex: '??????????????-STAR-L3U_GHRSST-SSTsubskin-AVHRRF_MB-ACSPO_V2.80-v02.0-fv01.0.nc'
bounds:
units: C
min: -3.0
max: 50.0
35 changes: 0 additions & 35 deletions parm/soca/obsproc/obsproc_config_test.yaml

This file was deleted.

7 changes: 0 additions & 7 deletions parm/templates/stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ COMOUT: !ENV ${COMOUT}
DATA: !ENV ${DATA}
background_time: '{{background_time}}'
dump: !ENV ${CDUMP}
r2d2_obs_db: !ENV ${R2D2_OBS_DB}
r2d2_obs_dump: !ENV ${R2D2_OBS_DUMP}
r2d2_obs_src: !ENV ${R2D2_OBS_SRC}
r2d2_bc_src: !ENV ${R2D2_BC_SRC}
r2d2_bc_dump: !ENV ${R2D2_BC_DUMP}
r2d2 window length: !ENV ${R2D2_OBS_WINDOW}
r2d2 window begin: '{{r2d2_window_begin}}'
fv3jedi_stage_files: !ENV ${FV3JEDI_STAGE_YAML}
fv3jedi_stage: !ENV ${FV3JEDI_STAGE_YAML}
stage_dir: !ENV ${DATA}
Expand Down
20 changes: 3 additions & 17 deletions scripts/exgdas_global_marine_analysis_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

# import UFSDA utilities
import ufsda
from ufsda.stage import obs, soca_fix
from ufsda.stage import soca_fix


def agg_seaice(fname_in, fname_out):
Expand Down Expand Up @@ -225,7 +225,7 @@ def find_clim_ens(input_date):

logging.info(f"---------------- Setup runtime environement")

comin_obs = os.getenv('COMIN_OBS') # R2D2 DB for now
comin_obs = os.getenv('COMIN_OBS')
anl_dir = os.getenv('DATA')
staticsoca_dir = os.getenv('SOCA_INPUT_FIX_DIR')
if os.getenv('DOHYBVAR') == "YES":
Expand Down Expand Up @@ -259,29 +259,14 @@ def find_clim_ens(input_date):

logging.info(f"---------------- Stage observations")

# setup the archive, local and shared R2D2 databases
ufsda.r2d2.setup(r2d2_config_yaml=os.path.join(anl_dir, 'r2d2_config.yaml'), shared_root=comin_obs)

# create config dict from runtime env
envconfig = {'window_begin': f"{window_begin.strftime('%Y-%m-%dT%H:%M:%SZ')}",
'r2d2_obs_src': os.getenv('R2D2_OBS_SRC'),
'r2d2_obs_dump': os.getenv('R2D2_OBS_DUMP'),
'r2d2_obs_db': os.getenv('R2D2_OBS_DB'),
'ATM_WINDOW_BEGIN': window_begin_iso,
'ATM_WINDOW_MIDDLE': window_middle_iso,
'ATM_WINDOW_LENGTH': f"PT{os.getenv('assim_freq')}H"}
stage_cfg = YAMLFile(path=os.path.join(gdas_home, 'parm', 'templates', 'stage.yaml'))
stage_cfg = Template.substitute_structure(stage_cfg, TemplateConstants.DOUBLE_CURLY_BRACES, envconfig.get)
stage_cfg = Template.substitute_structure(stage_cfg, TemplateConstants.DOLLAR_PARENTHESES, envconfig.get)
stage_cfg['r2d2_obs_out'] = os.getenv('COM_OBS')

# stage observations from R2D2 COMIN_OBS to COM_OBS
ufsda.stage.obs(stage_cfg)

# concatenate altimeters into one obs space
# TODO (SAMG)temporary, move this into the obs procecing eventually
adt_obs = f"{os.getenv('COM_OBS')}/{RUN}.t{cyc}z.adt"
ufsda.soca_utils.concatenate_ioda(adt_obs, wildcard="*.nc4", output_suffix=f"_all.{PDY}{cyc}.nc4", clean=True)

# get the list of observations
obs_files = []
Expand All @@ -294,6 +279,7 @@ def find_clim_ens(input_date):
logging.info(f"******* {obs_file}")
obs_src = os.path.join(os.getenv('COM_OBS'), obs_file)
obs_dst = os.path.join(os.path.abspath(obs_in), obs_file)
logging.info(f"******* {obs_src}")
if os.path.exists(obs_src):
logging.info(f"******* fetching {obs_file}")
obs_list.append([obs_src, obs_dst])
Expand Down
3 changes: 3 additions & 0 deletions scripts/exglobal_prep_ocean_obs.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,7 @@
print("CRITICAL: Ill-formed OBS_YAML file, exiting")
raise

if not os.path.exists(COMOUT_OBS):
os.makedirs(COMOUT_OBS)

FileHandler({'copy': filesToSave}).sync()
Loading

0 comments on commit 1a0da00

Please sign in to comment.