Skip to content

WW3 in UFS

Jessica Meixner edited this page Jul 12, 2023 · 9 revisions

WW3 is being used in multiple UFS models including the ufs-weather-model, coastal and HAFS. The following information is intended to help developers and users of UFS.

(This is a work in progress, always feel free to submit issues)

Frequently Asked Questions

How to make new mod_def files for regression tests?

Use the routine in ${INPUTDATA_ROOT_WW3}/createmoddefs/creategridfiles.sh where INPUTDATA_ROOT_WW3 is defined by ufs-weather-model/tests/rt.sh

The creategridfiles.sh needs to be copied to a location you can edit. Follow the instructions at the top of the script replacing the needed variables. Run this script, create your new mod_def files and then update your INPUTDATA_ROOT_WW3 to get new mod_def files.

Frequently Asked Questions for the mesh cap

Which branch of WW3?

For the mesh cap, which is currently used by the ufs-weather-model, please see the dev/ufs-weather-model branch of WW3. Most information can be found on https://github.com/ufs-community/ufs-weather-model

Which WW3 switch is used?

Two switches are used depending on if PDLIB=ON (default OFF).
Without PDLIB: model/bin/switch_meshcap With PDLIB: model/bin/switch_meshcap_pdlib

Frequently Asked Questions for the wmesmf cap

Which WW3 switch is used?

model/esmf/switch

Which program(s) is the NUOPC cap?

model/ftn/wmesmfmd.ftn

How to turn on field dumps?

Activate the appropriate cpp flag in wmesmfmd.ftn, which are all by default disabled:

#define TEST_WMESMFMD___disabled
#define TEST_WMESMFMD_GETIMPORT___disabled
#define TEST_WMESMFMD_SETEXPORT___disabled
#define TEST_WMESMFMD_CREATEIMPGRID___disabled
#define TEST_WMESMFMD_CREATEEXPGRID___disabled
#define TEST_WMESMFMD_SETUPIMPBMSK___disabled
#define TEST_WMESMFMD_CHARNK___disabled
#define TEST_WMESMFMD_ROUGHL___disabled
#define TEST_WMESMFMD_BOTCUR___disabled
#define TEST_WMESMFMD_RADSTR2D___disabled
#define TEST_WMESMFMD_STOKES3D___disabled
#define TEST_WMESMFMD_PSTOKES___disabled

For example, to get field dumps for all export fields set:

#define TEST_WMESMFMD_SETEXPORT

Where to get additional WW3 specific timing information from WW3 cap?

If print_esmf is set to true, for the wave PETS, at the end of the log files PET???.ESMF_LogFile, you will get the following timing information:

20210323 165120.988 INFO             PET519 WAV: wtime:                timer     count          time
20210323 165120.988 INFO             PET519 WAV: wtime:         InitializeP0         1  0.137806E-03
20210323 165120.988 INFO             PET519 WAV: wtime:         InitializeP1         1  0.118056E+01
20210323 165120.988 INFO             PET519 WAV: wtime:         InitializeP3         1  0.187102E+00
20210323 165120.988 INFO             PET519 WAV: wtime:       DataInitialize         2  0.713091E-01
20210323 165120.988 INFO             PET519 WAV: wtime:         ModelAdvance        96  0.700550E+03
20210323 165120.988 INFO             PET519 WAV: wtime:             Finalize         1  0.577927E-03
20210323 165120.988 INFO             PET519 WAV: wtime:            GetImport        97  0.506196E+01
20210323 165120.988 INFO             PET519 WAV: wtime:            SetExport        97  0.174132E+02
20210323 165120.988 INFO             PET519 WAV: wtime:          FieldGather       485  0.484256E+01
20210323 165120.988 INFO             PET519 WAV: wtime:            FieldFill       691  0.661621E-01

(For information about using ESMF profiling tools in ufs-weather-model please see: https://github.com/ufs-community/ufs-weather-model/wiki/Advanced-Topics-for-developers#profiling-timing-across-components)

Where to find information about cap in manual?

The manual for the last public release can be found here: https://github.com/NOAA-EMC/WW3/wiki/Tech-Docs or you can build the latest version of the manual from the manual directory. See the section in the appendix titled "Coupling with NUOPC".