Skip to content

Commit

Permalink
Merge branch 'ufs-community:develop' into feature/old_static_error
Browse files Browse the repository at this point in the history
  • Loading branch information
LarissaReames-NOAA authored Mar 18, 2024
2 parents 5c99fb6 + 72fb94f commit 8608666
Show file tree
Hide file tree
Showing 34 changed files with 843 additions and 236 deletions.
6 changes: 5 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ option(FRENCTOOLS "Enable building fre-nctools.fd" ON)
option(GRIDTOOLS "Enable building grid_tools.fd" ON)
option(CHGRES "Enable building chgres_cube.fd" ON)
option(OROG_MASK_TOOLS "Enable building orog_mask_tools.fd" ON)
# OROG_MASK_TOOLS must be ON for OROG_NETCDF_TOOLS to build.
option(OROG_NETCDF_TOOLS "Enable building orog_netcdf_tools.fd" OFF)
option(SFC_CLIMO_GEN "Enable building sfc_climo_gen.fd" ON)
option(VCOORD_GEN "Enable building vcoord_gen.fd" ON)
option(FVCOMTOOLS "Enable building fvcom_tools.fd" ON)
Expand Down Expand Up @@ -102,8 +104,10 @@ find_package(w3emc 2.9.0 REQUIRED)
find_package(bacio 2.4.0 REQUIRED)
find_package(nemsio 2.5.0 REQUIRED)
find_package(sigio 2.3.0 REQUIRED)
find_package(sp 2.3.3 REQUIRED)
find_package(ip 3.3.3 REQUIRED)
if(ip_VERSION LESS 5.0)
find_package(sp 2.3.3 REQUIRED)
endif()
find_package(g2 3.4.3 REQUIRED)
find_package(sigio 2.3.0 REQUIRED)

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.12.0
1.13.0
1 change: 1 addition & 0 deletions docs/main.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ https://github.com/ufs-community/UFS_UTILS.

## Documentation for Previous Versions of UFS_UTILS

* [UFS_UTILS Version 1.13.0](ver-1.13.0/index.html)
* [UFS_UTILS Version 1.12.0](ver-1.12.0/index.html)
* [UFS_UTILS Version 1.11.0](ver-1.11.0/index.html)
* [UFS_UTILS Version 1.10.0](ver-1.10.0/index.html)
Expand Down
4 changes: 2 additions & 2 deletions docs/source/chgres_cube.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Program inputs and outputs for global applications

**Inputs**

Users may create their own global grids, or use the pre-defined files are located `here <https://ftp.emc.ncep.noaa.gov/EIB/UFS/global/fix/fix_fv3_gmted2010.v20191213/>`_.
Users may create their own global grids, or use the pre-defined files located `here <https://ftp.emc.ncep.noaa.gov/static_files/public/UFS/GFS/fix/fix_fv3_gmted2010/>`_.

* FV3 mosaic file - (NetCDF format)
* CRES_mosaic.nc
Expand All @@ -76,7 +76,7 @@ Users may create their own global grids, or use the pre-defined files are locate
* CRES_oro_data.tile5.nc
* CRES_oro_data.tile6.nc

* FV3 surface climatological files - Located under the `./fix_sfc <https://ftp.emc.ncep.noaa.gov/EIB/UFS/global/fix/fix_fv3_gmted2010.v20191213/C48/fix_sfc>`_ sub-directory. One file for each tile. NetCDF format.
* FV3 surface climatological files - Located under the `./fix_sfc <https://ftp.emc.ncep.noaa.gov/static_files/public/UFS/GFS/fix/fix_fv3_gmted2010/C48/fix_sfc>`_ sub-directory. One file for each tile. NetCDF format.
* CRES.facsf.tileX.nc (fractional coverage for strong/weak zenith angle dependent albedo)
* CRES.maximum_snow_albedo.tileX.nc (maximum snow albedo)
* CRES.slope_type.tileX.nc (slope type)
Expand Down
76 changes: 73 additions & 3 deletions docs/source/ufs_utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,11 @@ Program inputs and outputs

* The "grid" files (CRES_grid.tile#.nc) containing the geo-reference records for the grid - (NetCDF). Created by the make_hgrid or regional_esg_grid programs.
* Global 30-arc-second University of Maryland land cover data. Used to create the land-sea mask.
* landcover30.fixed (unformatted binary). Located here `./fix/fix_orog <https://noaa-ufs-srw-pds.s3.amazonaws.com/index.html#fix/fix_orog/>`_.
* landcover.umd.30s.nc (NetCDF). Located here `./fix/fix_orog <https://noaa-ufs-srw-pds.s3.amazonaws.com/index.html#fix/fix_orog/>`_.
* Global 30-arc-second USGS GMTED2010 orography data.
* gmted2010.30sec.int (unformatted binary). Located here `./fix/fix_orog <https://noaa-ufs-srw-pds.s3.amazonaws.com/index.html#fix/fix_orog/>`_.
* topography.gmted2010.30s.nc (NetCDF). Located here `./fix/fix_orog <https://noaa-ufs-srw-pds.s3.amazonaws.com/index.html#fix/fix_orog/>`_.
* 30-arc-second RAMP Antarctic terrain data (Radarsat Antarctic Mapping Project)
* thirty.second.antarctic.new.bin (unformatted binary). Located here `./fix/fix_orog <https://noaa-ufs-srw-pds.s3.amazonaws.com/index.html#fix/fix_orog/>`_.
* topography.antarctica.ramp.30s.nc (NetCDF). Located here `./fix/fix_orog <https://noaa-ufs-srw-pds.s3.amazonaws.com/index.html#fix/fix_orog/>`_.

**Output data:**

Expand Down Expand Up @@ -665,3 +665,73 @@ Run script
----------

To run, use the machine-dependent script under ./util/weight_gen

***************************************************
UFS_UTILS utilities
***************************************************

gdas_init
=========

Introduction
------------

The gdas_init utility is used to create coldstart initial conditions for global cycled and forecast-only experiments using the chgres_cube program. It has two components: one that pulls the input data required by chgres_cube from HPSS, and one that runs chgres_cube. The utility is only supported on machines with access to HPSS:

* Hera
* Jet
* WCOSS2
* S4 (Only the chgres_cube step is supported, not the data pull step.)

Location
--------

Find it here: ./util/gdas_init

Build UFS_UTILS and set 'fixed' directories
-------------------------------------------

Invoke the build script from the root directory:

::

./build_all.sh

Set the 'fixed' directories using the script in the './fix' subdirectory (where $MACHINE is 'hera', 'jet', 'wcoss2', or 's4'):

::

./link_fixdirs.sh emc $MACHINE

Configure for your experiment
-----------------------------

Edit the variables in the 'config' file for your experiment:

* **EXTRACT_DIR** - Directory where data extracted from HPSS is stored.
* **EXTRACT_DATA** - Set to 'yes' to extract data from HPSS. If data has been extracted and is located in EXTRACT_DIR, set to 'no'. On 's4' this step can't be run. Instead, the data must be pulled from another machine.
* **RUN_CHGRES** - To run chgres, set to 'yes'. To extract data only, set to 'no'.
* **yy/mm/dd/hh** - The year/month/day/hour of your desired experiment. Currently, does not support pre-ENKF GFS data, prior to 2012 May 21 00z. Use two digits.
* **LEVS** - Number of hybrid levels plus 1. To run with 127 levels, set LEVS to 128.
* **CRES_HIRES** - Resolution of the hires component of your experiment. Example: C768.
* **CRES_ENKF** - Resolution of the enkf component of the experiments.
* **UFS_DIR** - Location of your cloned UFS_UTILS repository.
* **OUTDIR** - Directory where the coldstart data output from chgres is stored.
* **CDUMP** - When 'gdas', will process gdas and enkf members. When 'gfs', will process gfs member for running free forecast only.
* **use_v16retro** - When 'yes', use v16 retrospective parallel data. The retrospective parallel tarballs can be missing or incomplete. So this option may not always work. Contact a UFS_UTILS repository manager if you encounter problems.

Note: This utility selects the ocean resolution in the set_fixed_files.sh script using a default based on the user-selected CRES value. For example, for a cycled experiment with a CRES_HIRES/CRES_ENKF of C384/C192, the ocean resolution defaults to 0.25/0.50-degree. To choose another ocean resolution, the user will need to manually modify the set_fixed_files.sh script.


Kick off the utility
--------------------

Submit the driver script (where $MACHINE is 'hera', 'jet', 'wcoss2', or 's4')

::

./driver.$MACHINE.sh

The standard output will be placed in log files in the current directory.

The converted output will be found in $OUTDIR, including the needed abias and radstat initial condition files (if CDUMP=gdas). The files will be in the needed directory structure for the global-workflow system, therefore a user can move the contents of their $OUTDIR directly into their $ROTDIR.
2 changes: 1 addition & 1 deletion modulefiles/build.jet.intel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Load environment to compile UFS_UTILS on Jet using Intel
hpss_ver=os.getenv("hpss_ver") or ""
load(pathJoin("hpss", hpss_ver))

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

stack_intel_ver=os.getenv("stack_intel_ver") or "2021.5.0"
load(pathJoin("stack-intel", stack_intel_ver))
Expand Down
2 changes: 1 addition & 1 deletion reg_tests/grid_gen/driver.jet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ TEST1=$(sbatch --parsable --ntasks-per-node=24 --nodes=1 -t 0:20:00 -A $PROJECT_
#-----------------------------------------------------------------------------

LOG_FILE2=${LOG_FILE}02
TEST2=$(sbatch --parsable --ntasks-per-node=10 --nodes=3 -t 0:15:00 -A $PROJECT_CODE -q $QUEUE -J c96.viirs.bnu \
TEST2=$(sbatch --parsable --ntasks-per-node=12 --nodes=4 -t 0:15:00 -A $PROJECT_CODE -q $QUEUE -J c96.viirs.bnu \
--partition=xjet -o $LOG_FILE2 -e $LOG_FILE2 ./c96.viirs.bnu.sh)

#-----------------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions reg_tests/ice_blend/driver.jet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ fi

export WGRIB=/apps/wgrib/1.8.1.0b/bin/wgrib
export WGRIB2=${WGRIB2_ROOT}/bin/wgrib2
export COPYGB=/lfs4/HFIP/hfv3gfs/emc.nemspara/role.ufsutils/ufs_utils/grib_util/NCEPLIBS-grib_util/exec/bin/copygb
export COPYGB2=/lfs4/HFIP/hfv3gfs/emc.nemspara/role.ufsutils/ufs_utils/grib_util/NCEPLIBS-grib_util/exec/bin/copygb2
export CNVGRIB=/apps/cnvgrib/1.4.0/bin/cnvgrib
export COPYGB=/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/intel/2021.5.0/grib-util-1.3.0-hrqavdi/bin/copygb
export COPYGB2=/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/intel/2021.5.0/grib-util-1.3.0-hrqavdi/bin/copygb2
export CNVGRIB=/mnt/lfs4/HFIP/hfv3gfs/role.epic/spack-stack/spack-stack-1.6.0/envs/unified-env-rocky8/install/intel/2021.5.0/grib-util-1.3.0-hrqavdi/bin/cnvgrib

export HOMEreg=/lfs4/HFIP/hfv3gfs/emc.nemspara/role.ufsutils/ufs_utils/reg_tests/ice_blend

Expand Down
5 changes: 4 additions & 1 deletion sorc/chgres_cube.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,16 @@ target_link_libraries(
sigio::sigio
bacio::bacio_4
ip::ip_d
sp::sp_d
w3emc::w3emc_d
esmf
msis2
MPI::MPI_Fortran
NetCDF::NetCDF_Fortran)

if(sp_FOUND)
target_link_libraries(chgres_cube_lib PUBLIC sp::sp_d)
endif()

if(OpenMP_Fortran_FOUND)
target_link_libraries(${exe_name} PUBLIC OpenMP::OpenMP_Fortran)
endif()
Expand Down
5 changes: 4 additions & 1 deletion sorc/emcsfc_snow2mdl.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@ target_link_libraries(snow2mdl_lib
PUBLIC
g2::g2_d
ip::ip_d
sp::sp_d
bacio::bacio_4
w3emc::w3emc_d)

if(sp_FOUND)
target_link_libraries(snow2mdl_lib PUBLIC sp::sp_d)
endif()

if(OpenMP_Fortran_FOUND)
target_link_libraries(${exe_name} PUBLIC OpenMP::OpenMP_Fortran)
endif()
Expand Down
5 changes: 4 additions & 1 deletion sorc/global_cycle.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ target_link_libraries(
w3emc::w3emc_d
bacio::bacio_4
ip::ip_d
sp::sp_d
MPI::MPI_Fortran
NetCDF::NetCDF_Fortran
noah_lsm_routines)

if(sp_FOUND)
target_link_libraries(global_cycle_lib PUBLIC sp::sp_d)
endif()

if(OpenMP_Fortran_FOUND)
target_link_libraries(global_cycle_lib PUBLIC OpenMP::OpenMP_Fortran)
endif()
Expand Down
5 changes: 5 additions & 0 deletions sorc/orog_mask_tools.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ add_subdirectory(orog.fd)
add_subdirectory(orog_gsl.fd)
add_subdirectory(lake.fd)
add_subdirectory(inland.fd)
if(OROG_NETCDF_TOOLS)
add_subdirectory(orog_netcdf_tools.fd/mask.fd)
add_subdirectory(orog_netcdf_tools.fd/topo.fd)
add_subdirectory(orog_netcdf_tools.fd/ramp.fd)
endif()

# If doxygen documentation we enabled, build it.
if(ENABLE_DOCS)
Expand Down
5 changes: 4 additions & 1 deletion sorc/orog_mask_tools.fd/orog.fd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ target_link_libraries(
bacio::bacio_4
w3emc::w3emc_d
ip::ip_d
sp::sp_d
NetCDF::NetCDF_Fortran)

if(sp_FOUND)
target_link_libraries(orog_lib PUBLIC sp::sp_d)
endif()

if(OpenMP_Fortran_FOUND)
target_link_libraries(orog_lib PUBLIC OpenMP::OpenMP_Fortran)
endif()
Expand Down
Loading

0 comments on commit 8608666

Please sign in to comment.