Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grid and fix file generation for the coupled model #647

Merged

Conversation

DeniseWorthen
Copy link
Contributor

@DeniseWorthen DeniseWorthen commented May 6, 2022

DESCRIPTION OF CHANGES:

Adds a new utility cpld_gridgen which creates the following files required by the coupled model

  • The CICE6 grid and mask file
  • The mesh file for the desired OCN/ICE resolution, which is identical for MOM6 and CICE6. Also used by WAV.
  • The lat,lon,bathymetry and land mask files required to generate the mod_def file for WW3 on the tripole grid.
  • The mapped ocean mask on the FV3 tiles
  • The ESMF regridding weights required to create the CICE6 IC from CPC (SIS2) reanalysis.
  • The ESMF regridding weights required to remap the CICE6 or MOM6 output from tripole grid to a rectilinear grid (optional).

TESTS CONDUCTED:

A new regression test script is added for the utility.

cd fix
./link_fixdirs.sh emc $machine
cd ../reg_tests/cpld_gridgen
./rt.sh -b

Baselines have been created on hera,orion, and jet.

DOCUMENTATION:

Documentation has been added in sorc/cpld_gridgen.fd/docs

ISSUE:

Resolves Issue #143

CONTRIBUTORS (optional):

@MinsukJi-NOAA

DeniseWorthen and others added 30 commits September 2, 2020 16:51
1) CICE5_ICgen: grid generation for cice5/cice6

2) CICE5_gridgen: initial condition generation for cice5/cice6

3) WeightGen: weight generation for:

a) gen_fixgrid and associated fortran code:
a fortran routine to read the MOM6 supergrid
and create a netcdf file which is the basis for the
remaining transformations

b) generate_icocn_weights.ncl:
esmf weight generation for tripole:tripole or
tripole:rectilinear or other grid:grid transformations

c) generate_icemesh.ncl:
generation of the ice_mesh for use by the CMEPS mediator

d) generate_frac_land_weights.sh:
generation of the frac_land weights (the ocean mask on the
fv3 grid) using ESMF_RegridWeightGen

d) cmake_frac_land.ncl:
creation of the 6-tiled land_frac files
* remove ESMF_RegridWeightGenMod use statements after update
of ESMF version
* fix missing shell variable for mx400 case
@DeniseWorthen
Copy link
Contributor Author

@GeorgeGayno-NOAA I believe the RTs are now functioning on all platforms. After 615a9fa I was able to verify several times on hera, orion and jet. I merged in the latest develop and then realized I had not updated this branch w/ the unit test which reads a netcdf file. That is where the current workflow jobs are failing so I will work on that now.

@MinsukJi-NOAA
Copy link
Contributor

@GeorgeGayno-NOAA @DeniseWorthen The latest commit failed to build on all 3 platforms.

-- Found sigio: /apps/contrib/NCEP/libs/hpc-stack/intel-2022.1.2/sigio/2.3.2/lib/libsigio.a (found version "2.3.0")
-- Configuring done
CMake Error at sorc/global_cycle.fd/CMakeLists.txt:27 (add_library):
  Cannot find source file:

    ../../ccpp-physics/physics/sfcsub.F

  Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm 
  .hpp .hxx .in .txx


CMake Error at sorc/global_cycle.fd/CMakeLists.txt:27 (add_library):
  No SOURCES given to target: global_cycle_lib


CMake Generate step failed.  Build files cannot be regenerated correctly.

@DeniseWorthen
Copy link
Contributor Author

That's the new ccpp submodule. I thought I had it working.

@MinsukJi-NOAA
Copy link
Contributor

That's the new ccpp submodule. I thought I had it working.

I didn't know ufs_utils now has a submodule. after git submodule update, it is building.

@DeniseWorthen
Copy link
Contributor Author

I've now gotten an error during runtime though:

./cpld_gridgen.sh: line 109: ncks: command not found

I think we need an NCO module loaded.

@GeorgeGayno-NOAA
Copy link
Collaborator

That's the new ccpp submodule. I thought I had it working.

I didn't know ufs_utils now has a submodule. after git submodule update, it is building.

Yes, a recent update to 'develop' now points to the CCPP physics repo.

@MinsukJi-NOAA
Copy link
Contributor

Got the same ncks error. NCO module was added in one of my commits. It looks like they were deleted here:
DeniseWorthen@412f458

@DeniseWorthen
Copy link
Contributor Author

Ah, sorry. I was merging develop and didn't realize. Let me fix it.

@MinsukJi-NOAA
Copy link
Contributor

a0595bf passed all regression tests on hera and orion. Looks like jet needs a new baseline.

@GeorgeGayno-NOAA
Copy link
Collaborator

a0595bf passed all regression tests on hera and orion. Looks like jet needs a new baseline.

If you create the new baseline, I will copy it to the proper directory. Just let me know where the files are.

@DeniseWorthen
Copy link
Contributor Author

I have one I was using earlier. Let me test it.

@GeorgeGayno-NOAA
Copy link
Collaborator

Thanks, @GeorgeGayno-NOAA I'll add an abort if someone tries more than one task. Thinking back, I'm pretty sure I played w/ running on more than one task for the 1/12 deg case (which we're not currently implementing). But I was doing that in an interactive job.

I can also push a change that deallocates some variables sooner, but in my test on Jet I still got out-of-memory errors with that change.

I have been able to run 3 times against the baseline I created on jet using the change I showed above.

I tried your branch at a0595bf with 4 mpi tasks. It failed with an error message as expected. Thanks. That will help users (and save us questions!).

@DeniseWorthen
Copy link
Contributor Author

I have a jet baseline here /lfs4/HFIP/h-nems/Denise.Worthen/CPLD_GRIDGEN/BASELINE

@GeorgeGayno-NOAA
Copy link
Collaborator

I have a jet baseline here /lfs4/HFIP/h-nems/Denise.Worthen/CPLD_GRIDGEN/BASELINE

Thanks. I placed the data under the official directory.

@MinsukJi-NOAA
Copy link
Contributor

I have a jet baseline here /lfs4/HFIP/h-nems/Denise.Worthen/CPLD_GRIDGEN/BASELINE

Thanks. I placed the data under the official directory.

Jet regression tests passed.

@GeorgeGayno-NOAA
Copy link
Collaborator

@DeniseWorthen and @MinsukJi-NOAA - is everything working now? I can do some final tests today, then merge to 'develop'.

@MinsukJi-NOAA
Copy link
Contributor

@DeniseWorthen and @MinsukJi-NOAA - is everything working now? I can do some final tests today, then merge to 'develop'.

@GeorgeGayno-NOAA It looks good to me.

@DeniseWorthen
Copy link
Contributor Author

@GeorgeGayno-NOAA I agree. I think this is ready now.

@GeorgeGayno-NOAA
Copy link
Collaborator

@DeniseWorthen I have a minor fix so it builds with GNU on Hera. I will check it into your branch.

@GeorgeGayno-NOAA
Copy link
Collaborator

The branch at eff6549 was successfully compiled on Jet, Orion, Hera (Intel and GNU), WCOSS-Cray and WCOSS-Dell. The cpld_gridgen regression tests were successfully run on Jet, Orion and Hera. Ready to merge.

@GeorgeGayno-NOAA GeorgeGayno-NOAA merged commit 4e9ca5e into ufs-community:develop May 31, 2022
@DeniseWorthen
Copy link
Contributor Author

Thanks so much @MinsukJi-NOAA and @GeorgeGayno-NOAA for helping get this done.

AnnetteGibbs-NOAA added a commit to AnnetteGibbs-NOAA/UFS_UTILS that referenced this pull request Jul 3, 2023
* origin/develop:
  Update ccpp submodule (ufs-community#827)
  Change length of character variable "mosaic_name" in "make_solo_mosaic.c" (ufs-community#824)
  Update GDAS INIT utility for GFS COM reorganization (ufs-community#820)
  Add backup calculation for orography and mask generation (ufs-community#713)
  Improve repository build script (ufs-community#819)
  Use latest wgrib2 executable on Jet. (ufs-community#816)
  chgres_cube - Minor update for high-resolution grids . (ufs-community#814)
  Update PR template (ufs-community#813)
  global_cycle - Add soil moisture nudging for NoahMP option (ufs-community#809)
  Release v1.10.0 (ufs-community#807)
  Run sfc_climo_gen utility on Hera (ufs-community#791)
  Fix bug in chgres_cube subroutine search_many (ufs-community#808)
  sfc_climo_gen - Output fractions of each vegetation/soil type category (ufs-community#748)
  Replace w3nco library with w3emc (ufs-community#802)
  Fix Debug compilation (ufs-community#800)
  Update WCOSS2 build module to use new ESMF v8.4.1 library. (ufs-community#799)
  Update chgres_cube documentation for duplicate grib2 records (ufs-community#795)
  Use latest Cray modules on WCOSS2 (ufs-community#792)
  Remove checksum attribute from global_cycle restart files (ufs-community#794)
  Remove goto statements from chgres_cube (ufs-community#775)
  FVCOM_TOOLS - Remove dependency on module_nwp_base.f90 (ufs-community#790)
  Remove "gcovr" step from the 'developer' workflow (ufs-community#785)
  Update build module for Cheyenne (ufs-community#783)
  GDAS Init utility - consolidate the copy of coldstart files (ufs-community#773)
  Remove support for ODIN machine (ufs-community#782)
  Update GDAS INIT utility to optionally use fracoro data (ufs-community#741)
  Option to build only application specific utilities (e.g. GFS) (ufs-community#777)
  Use combined IP/IP2 library (ufs-community#695)
  Initial updates to global_cycle for Noah-MP land model (ufs-community#774)
  New resolution options for the cpld_gridgen utility (ufs-community#769)
  Use new EPIC-maintained hpc-stack on Jet  (ufs-community#771)
  Update GDAS initialization scripts for the new ENKF directory (ufs-community#764)
  Reduce memory usage in chgres_cube (ufs-community#766)
  Detect duplicate vertical levels in chgres_cube. (ufs-community#767)
  Point to new input orography directory. (ufs-community#758)
  Release version 1.9 (ufs-community#754)
  HAFSv1 grid nesting updates (ufs-community#752)
  Remove compiler warnings from chgres_cube (ufs-community#747)
  chgres_cube: Split input_data module into to 3 separate modules (ufs-community#744)
  More work on CI, checking with different versions of ESMF (ufs-community#742)
  Add processing of soil color to sfc_climo_gen (ufs-community#721)
  more work on CI - added Linux_versions workflow (ufs-community#739)
  Add TEST_FILE_DIR option to CMake build, where test data files can be found instead of using FTP.  (ufs-community#732)
  adding developer workflow (ufs-community#724)
  Update GDAS INIT utility for v16.3. (ufs-community#723)
  OROG_GSL - Remove negative bias in orographic asymmetery (OA) fields (ufs-community#718)
  Incorporate BNU soil type data (ufs-community#717)
  High-resolution MODIS and STATSGO veg/soil data. (ufs-community#703)
  Run WCOSS2 consistency tests under role account (ufs-community#711)
  Fix macOS CI workflow (ufs-community#715)
  Add utility codes to create BNU soil texture data (ufs-community#707)
  Update chgres_cube to output netcdf4 file. (ufs-community#704)
  Incorporate high-res global VIIRS vegetation data. (ufs-community#699)
  Run grid_gen consistency tests in parallel. (ufs-community#697)
  Fix error handling in "link_fixdirs.sh". Add -L to the copy command. (ufs-community#701)
  Update for new fixed data directory structure (ufs-community#688)
  Add WCOSS2 support for tests (ufs-community#693)
  Increase test data pull timeout (ufs-community#692)
  Option to install binaries to any directory. (ufs-community#685)
  Update global_cycle to use the latest CCPP version of sfcsub.F (ufs-community#671)
  Incorporate weight_gen program. (ufs-community#677)
  Add install of jpeg-turbo to macos workflows (ufs-community#684)
  Improve logic in regression test driver script (ufs-community#681)
  Release v1.8 (ufs-community#679)
  Update link_fixdirs.sh for new data directories (ufs-community#672)
  Update default ice climatology in ./ush/global_cycle.sh. (ufs-community#664)
  Remove all references to WCOSS 1 from UFS_UTILS (ufs-community#667)
  Update workflows to use latest macOS and ubuntu (ufs-community#675)
  Update GDAS Initialization utility for recent HPSS tarball name change (ufs-community#666)
  Port UFS_UTILS to WCOSS2 (ufs-community#642)
  Fix chgres_cube to process GEFS GRIB2 data (ufs-community#658)
  Update global_cycle_driver.sh for GFS OPS directory convention  (ufs-community#655)
  Update documentation for SRW App (ufs-community#656)
  New coupled model utility (ufs-community#647)
  Update support for S4 and enable regression testing (ufs-community#654)
  global_cycle - Link to CCPP version of sfcsub.F (ufs-community#636)
  Add processing of new global AFWA snow data to emcsfc_snow2mdl. (ufs-community#648)
  Update build module on Cheyenne (ufs-community#646)
  Move to Intel 2022 on Jet, Hera and Orion (ufs-community#650)
  Host doxygen documentation for multiple releases (ufs-community#644)
  Download unit test data as part of the CMake build (ufs-community#630)
  chgres_cube - Complete removal of wgrib2 library (ufs-community#641)
  Eliminate circular dependency in chgres_cube
  Update workflow files to pull netcdf-c library from GitHub
  chgres_cube - Remove the wgrib2 library from the GRIB2 data read routines.
  Undefined symbols on macOS with Intel compiler (ufs-community#628)
  Update FVCOM code to handle sub-domain restart files using multiple cores. (ufs-community#624)
  chgres_cube - Run routine 'convert_omega' on all tasks. (ufs-community#627)
  Use ESMF 8.2.0 library
  Automate update of consistency test baseline data. (ufs-community#603)
  Update workflow files to use newer versions of ESMF and NCEPLIBS. (ufs-community#617)
  Update build modules to be lua compliant (ufs-community#614)
  Allow FVCOM tools to Update Ice Surface Roughness Length (ufs-community#604)
  Update the requested memory in the Orion chgres_cube consistency test script (ufs-community#611)
  Use copy of grib_util under Jet role account. (ufs-community#608)
  Run consistency tests on Orion using role account (ufs-community#606)
  Run consistency tests on Hera using role account (ufs-community#605)
  Run consistency tests on Jet using role account. (ufs-community#607)
  Update more documentation after move to ufs-community (ufs-community#597)
  fvcom_tools - Add option to process 'cold' or 'warm' restart files (ufs-community#595)
  Update documentation after move to ufs-community (ufs-community#594)
  chgres_cube - Eliminate segmentation fault in input_data.F90 (ufs-community#585)
  Update to language of unit test README to match that in unit test.
  chgres_cube - Simplify surface processing using field bundles (ufs-community#572)
  Add compiler flags for GNU Fortran v10 or newer compilers. (ufs-community#583)
  Move verbose output from example unit test to be commented to streamline test output.
  Updates to test README to add instructions for use of example unit test.
  Add Findwgrib2.cmake (ufs-community#578)
  Added unit test to be used as an instructional example for new users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants