Skip to content

Commit

Permalink
Merge branch 'develop' into feature/atms_bc
Browse files Browse the repository at this point in the history
  • Loading branch information
xyzemc authored Sep 5, 2024
2 parents 1639986 + 97afb4b commit d2f1989
Show file tree
Hide file tree
Showing 27 changed files with 578 additions and 464 deletions.
7 changes: 7 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,13 @@ else
exit 1
fi

# Link in MPAS-JEDI test data
if [[ $DYCORE == 'MPAS' || $DYCORE == 'FV3andMPAS' ]]; then
# Link in case data
echo "Linking in test data for MPAS-JEDI case"
$dir_root/rrfs-test/scripts/link_mpasjedi_expr.sh
fi

# JCSDA changed test data things, need to make a dummy CRTM directory
if [[ $BUILD_TARGET == 'hera' ]]; then
if [ -d "$dir_root/bundle/fix/test-data-release/" ]; then rm -rf $dir_root/bundle/fix/test-data-release/; fi
Expand Down
3 changes: 1 addition & 2 deletions bundle/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,8 @@ endif()
file( COPY "${RDAS_RRFS_DATA_ROOT}/rrfs-data_fv3jedi_2022052619" DESTINATION "${DESTINATION_DIR}/rrfs-test-data" )
endif()
if(MPAS_DYCORE)
file( COPY "${RDAS_RRFS_DATA_ROOT}/rrfs-data_mpasjedi_2022052619" DESTINATION "${DESTINATION_DIR}/rrfs-test-data" )
file( COPY "${CMAKE_CURRENT_SOURCE_DIR}/../expr/mpas_2024052700/" DESTINATION "${DESTINATION_DIR}/rrfs-test-data/rrfs-data_mpasjedi_2024052700" )
endif()

ecbuild_bundle( PROJECT rrfs-test SOURCE "../rrfs-test" )
endif(CLONE_RRFSDATA)

Expand Down
11 changes: 2 additions & 9 deletions docs/build_and_test.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,6 @@ Run `./build.sh -h` to learn more about command line options supported by build.

## 3. RRFS CTest
```
module use modulefiles
module load RDAS/hera.intel
export SLURM_ACCOUNT=$account
cd build
ctest -VV -R rrfs_fv3jedi_hyb_2022052619
ctest -VV -R rrfs_fv3jedi_letkf_2022052619
ctest -VV -R rrfs_mpasjedi_2022052619_Ens3Dvar
ctest -VV -R rrfs_mpasjedi_2022052619_letkf
ush/run_rrfs_tests.sh $account
```
Where `hera.intel` should be replaced with a correct platform-dependent module file, such as `jet.intel`, `orion.intel`, `hercules.intel` etc. And `$account` is the slurm resource account (e.g., `fv3-cam`, `da-cpu`, `wrfruc`, etc.).
Where `$account` is your valid slurm resource account (e.g., `fv3-cam`, `da-cpu`, `wrfruc`, `rtrr`, `nrtrr`, etc.).
10 changes: 5 additions & 5 deletions modulefiles/RDAS/jet.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ local pkgName = myModuleName()
local pkgVersion = myModuleVersion()
local pkgNameVer = myModuleFullName()

prepend_path("MODULEPATH", '/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core')
prepend_path("MODULEPATH", '/contrib/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/modulefiles/Core')

-- below two lines get us access to the spack-stack modules
load("stack-intel/2021.5.0")
Expand Down Expand Up @@ -74,7 +74,7 @@ load("py-scipy/1.11.3")
load("py-xarray/2023.7.0")

-- hack for wxflow
prepend_path("PYTHONPATH", "/lfs4/BMC/nrtrr/RDAS_DATA/python/20240307")
prepend_path("PYTHONPATH", "/lfs5/BMC/nrtrr/RDAS_DATA/python/20240307")

setenv("CC","mpiicc")
setenv("FC","mpiifort")
Expand All @@ -85,9 +85,9 @@ local mpinproc = '-n'
setenv('MPIEXEC_EXEC', mpiexec)
setenv('MPIEXEC_NPROC', mpinproc)

setenv("CRTM_FIX","/lfs4/BMC/nrtrr/RDAS_DATA/crtm/2.4.0")
setenv("RDASAPP_TESTDATA","/lfs4/BMC/nrtrr/RDAS_DATA")
setenv("RDAS_RRFS_DATA_ROOT", "/lfs4/BMC/nrtrr/RDAS_DATA")
setenv("CRTM_FIX","/lfs5/BMC/nrtrr/RDAS_DATA/crtm/2.4.0")
setenv("RDASAPP_TESTDATA","/lfs5/BMC/nrtrr/RDAS_DATA")
setenv("RDAS_RRFS_DATA_ROOT", "/lfs5/BMC/nrtrr/RDAS_DATA")

whatis("Name: ".. pkgName)
whatis("Version: ".. pkgVersion)
Expand Down
33 changes: 16 additions & 17 deletions rrfs-test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ add_to_dictionary(rrfs_fv3jedi_tests "rrfs_fv3jedi_letkf_2022052619" "fv3jedi_

# MPAS-JEDI tests
set(rrfs_mpasjedi_tests)
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2022052619_Ens3Dvar" "mpasjedi_variational.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2022052619_atms_npp_qc" "mpasjedi_variational.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2022052619_atms_npp_qc_bc" "mpasjedi_variational.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2022052619_letkf" "mpasjedi_enkf.x")

add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_Ens3Dvar" "mpasjedi_variational.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_letkf" "mpasjedi_enkf.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_getkf" "mpasjedi_enkf.x")
add_to_dictionary(rrfs_mpasjedi_tests "rrfs_mpasjedi_2024052700_bumploc" "mpasjedi_error_covariance_toolbox.x")

# rrfs data - from rrfs-test-data repo if found, from local directory, or from tarball
if (CLONE_RRFSDATA)
Expand Down Expand Up @@ -66,6 +66,7 @@ if (CLONE_RRFSDATA)


endif()

if(MPAS_DYCORE)

message(STATUS "MACHINE_ID is " ${MACHINE_ID})
Expand All @@ -74,32 +75,30 @@ if (CLONE_RRFSDATA)
set(RESTORE_MPI_ARGS ${MPI_ARGS})
set(MPI_ARGS "${MPI_ARGS} --exclusive")
endif()
set(MPI_ARGS "${MPI_ARGS} --ntasks-per-node=18")
set(MPI_ARGS "${MPI_ARGS} --ntasks-per-node=4")

get_all_keys(rrfs_mpasjedi_tests caselist)
foreach(case ${caselist})
get_from_dictionary(rrfs_mpasjedi_tests case exe)
set(casedir "${CMAKE_CURRENT_BINARY_DIR}/rundir-${case}")
set(src_casedir "${rrfs-test_data_local}/rrfs-data_mpasjedi_2022052619")
set(src_casedir "${rrfs-test_data_local}/rrfs-data_mpasjedi_2024052700")
if (NOT EXISTS "${casedir}")
file(MAKE_DIRECTORY ${casedir})
endif()
file(CREATE_LINK ${src_casedir}/DataFix ${casedir}/DataFix SYMBOLIC)
file(CREATE_LINK ${src_casedir}/Data_static ${casedir}/Data_static SYMBOLIC)
file(CREATE_LINK ${src_casedir}/Data ${casedir}/Data SYMBOLIC)
file(COPY ${src_casedir}/streams.atmosphere_15km DESTINATION ${casedir})
file(COPY ${src_casedir}/namelist.atmosphere_15km DESTINATION ${casedir})
file(CREATE_LINK ${src_casedir}/data ${casedir}/data SYMBOLIC)
file(CREATE_LINK ${src_casedir}/graphinfo ${casedir}/graphinfo SYMBOLIC)
file(CREATE_LINK ${src_casedir}/stream_list ${casedir}/stream_list SYMBOLIC)
file(COPY ${src_casedir}/streams.atmosphere DESTINATION ${casedir})
file(COPY ${src_casedir}/namelist.atmosphere DESTINATION ${casedir})
file(COPY ${src_casedir}/geovars.yaml DESTINATION ${casedir})
file(COPY ${src_casedir}/keptvars.yaml DESTINATION ${casedir})
file(COPY ${src_casedir}/obsop_name_map.yaml DESTINATION ${casedir})
file(GLOB bl_FILES "${src_casedir}/*.*BL")
file(COPY ${bl_FILES} DESTINATION ${casedir})
file(GLOB DATA_FILES "${src_casedir}/*DATA*")
file(COPY ${DATA_FILES} DESTINATION ${casedir})
file(COPY ${src_yaml}/${case}.yaml DESTINATION ${casedir} )
file(GLOB bl_FILES "${src_casedir}/*.*BL")
file(COPY ${bl_FILES} DESTINATION ${casedir})
file(COPY ${src_yaml}/${case}.yaml DESTINATION ${casedir})
set(target_test ${case})
ecbuild_add_test( TARGET ${target_test}
MPI 36
MPI 120
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/rundir-${target_test}
ARGS ${target_test}.yaml
COMMAND ${exe} )
Expand Down
79 changes: 79 additions & 0 deletions rrfs-test/IODA/yaml/bufr_ncep_efclam.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# (C) Copyright 2024 NOAA/NWS/NCEP/EMC
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.

observations:
- obs space:
name: bufr

obsdatain: "./testinput_efclam/rtma.t00z.efclam.tm00.bufr_d"

exports:
variables:
# MetaData
timestamp:
datetime:
year: "*/YEAR"
month: "*/MNTH"
day: "*/DAYS"
hour: "*/HOUR"
minute: "*/MINU"
second: "*/SECO"
longitude:
query: "*/CLONH"
latitude:
query: "*/CLATH"
satelliteIdentifier:
query: "*/SAID"

# ObsValue
cloudAmountECAS:
query: "*/ECAS"
cloudAmountECAM:
query: "*/ECAM"


ioda:
backend: netcdf
obsdataout: "./testrun_efclam/rtma.t00z.efclam.tm00.bufr_d.nc"

variables:
# MetaData
- name: "MetaData/dateTime"
coordinates: "longitude latitude"
source: variables/timestamp
longName: "Datetime"
units: "seconds since 1970-01-01T00:00:00Z"

- name: "MetaData/latitude"
coordinates: "longitude latitude"
source: variables/latitude
longName: "Latitude"
units: "degree_north"
range: [-90, 90]

- name: "MetaData/longitude"
coordinates: "longitude latitude"
source: variables/longitude
longName: "Longitude"
units: "degree_east"
range: [-180, 180]

- name: "MetaData/satelliteIdentifier"
coordinates: "longitude latitude"
source: variables/satelliteIdentifier
longName: "Satellite Identifier"

# ObsValue - cloud
- name: "ObsValue/cloudAmount"
coordinates: "longitude latitude"
source: variables/cloudAmountECAS
longName: "Effective Cloud Amount At Center FOV"
units: "1"

- name: "ObsValue/cloudCoverTotal"
coordinates: "longitude latitude"
source: variables/cloudAmountECAM
longName: "Effective Cloud Amount Avg Mult FOV"
units: "1"
161 changes: 161 additions & 0 deletions rrfs-test/IODA/yaml/bufr_ncep_nexrad.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# (C) Copyright 2024 NOAA/NWS/NCEP/EMC
#
# This software is licensed under the terms of the Apache Licence Version 2.0
# which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.

observations:
- obs space:
name: bufr

obsdatain: "./testinput_20230610/rtma_ru.t0000z.nexrad.tm00.bufr_d"

exports:
group_by_variable: spectralWidth
variables:
# MetaData
timestamp:
datetime:
year: "*/YEAR"
month: "*/MNTH"
day: "*/DAYS"
hour: "*/HOUR"
minute: "*/MINU"
second: "*/SECO"
longitude:
query: "[*/CLON, */CLONH]"
latitude:
query: "[*/CLAT, */CLATH]"
stationIdentification:
query: "*/SSTN"

# ObsValue
height:
query: "*/HSMSL"
heightOfAntenna:
query: "*/HSALG"
beamAzimuthAngle:
query: "*/ANAZ"
beamTiltAngle:
query: "*/ANEL"
gateRange:
query: "*/NL2RW/DIST125M"
transforms:
- scale: 125
radialVelocity:
query: "*/NL2RW/DMVR"
spectralWidth:
query: "*/NL2RW/DVSW"
ppiVolume:
query: "*/VOID"
ppiIndex:
query: "*/SCID"
unfoldingVelocity:
query: "*/HNQV"
volumeCoveragePattern:
query: "*/VOCP"

# QualityMarker
windAlongRadialLineQM:
query: "*/QCRW"

ioda:
backend: netcdf
obsdataout: "./testrun_nexrad/rtma_ru.t0000z.nexrad.bufr.nc"

variables:
# MetaData
- name: "MetaData/dateTime"
coordinates: "longitude latitude"
source: variables/timestamp
longName: "Datetime"
units: "seconds since 1970-01-01T00:00:00Z"

- name: "MetaData/latitude"
coordinates: "longitude latitude"
source: variables/latitude
longName: "Latitude"
units: "degree_north"
range: [-90, 90]

- name: "MetaData/longitude"
coordinates: "longitude latitude"
source: variables/longitude
longName: "Longitude"
units: "degree_east"
range: [-180, 180]

- name: "MetaData/stationIdentification"
coordinates: "longitude latitude"
source: variables/stationIdentification
longName: "Station Identification"

# Observation
- name: "ObsValue/height"
coordinates: "longitude latitude"
source: variables/height
longName: "Height Of Station Ground Above MSL"
units: "m"

- name: "ObsValue/heightOfAntenna"
coordinates: "longitude latitude"
source: variables/heightOfAntenna
longName: "Height Of Antenna Above Ground"
units: "m"

- name: "ObsValue/beamAzimuthAngle"
coordinates: "longitude latitude"
source: variables/beamAzimuthAngle
longName: "Antenna Azimuth Angle"
units: "degree"

- name: "ObsValue/beamTiltAngle"
coordinates: "longitude latitude"
source: variables/beamTiltAngle
longName: "Antenna Elevation Angle"
units: "degree"

- name: "ObsValue/gateRange"
coordinates: "longitude latitude"
source: variables/gateRange
longName: "Distance From Antenna"
units: "m"

- name: "ObsValue/radialVelocity"
coordinates: "longitude latitude"
source: variables/radialVelocity
longName: "Doppler Mean Radial Velocity"
units: "m s-1"

- name: "ObsValue/spectralWidth"
coordinates: "longitude latitude"
source: variables/spectralWidth
longName: "Doppler Velocity Spectral Width"
units: "m s-1"

- name: "ObsValue/ppiVolume"
coordinates: "longitude latitude"
source: variables/ppiVolume
longName: "Radar Volume Id"

- name: "ObsValue/ppiIndex"
coordinates: "longitude latitude"
source: variables/ppiIndex
longName: "Radar Scan Id"

- name: "ObsValue/unfoldingVelocity"
coordinates: "longitude latitude"
source: variables/unfoldingVelocity
longName: "Unfolding Velocity (to compute Nyquist frequency)"
units: "m s-1"

- name: "ObsValue/volumeCoveragePattern"
coordinates: "longitude latitude"
source: variables/volumeCoveragePattern
longName: "Volume Coverage Pattern"

# QualityMarker
- name: "QualityMarker/unfoldingVelocity"
coordinates: "longitude latitude"
source: variables/windAlongRadialLineQM
longName: "Quality Marker For Wind Along Radial Line"

Loading

0 comments on commit d2f1989

Please sign in to comment.