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

Add arbitrary restart hour for UFS #522

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

DeniseWorthen
Copy link
Collaborator

Description of changes

Enables UFS to read a list of non-interval restart hours and write restarts when appropriate. This is required for operational implementations.

Incidentally adds new Land model component (LM4) for UFS and modifies CPP metadata for the FBH (fire-behavior model).

Specific notes

Code is added under an CESMCOUPLED flag and accesses share code within the UFS CDEPS share code (ufs/cdeps_share).

See related discussion https://github.com/orgs/esmf-org/discussions/291

Contributors other than yourself, if any:

@NickSzapiro-NOAA

CMEPS Issues Fixed (include github issue #):

ufs-community/ufs-weather-model#2348

Are changes expected to change answers? (specify if bfb, different at roundoff, more substantial)

Should not impact CESM

Any User Interface Changes (namelist or namelist defaults changes)?

Testing performed

Please describe the tests along with the target model and machine(s)
If possible, please also added hashes that were used in the testing

@DeniseWorthen
Copy link
Collaborator Author

@jedwards4b I'm not sure, but I might need an ifdef around the restart_fh logical in med_phases_restart_write to avoid and unused variable warning on your side?

Copy link
Collaborator

@jedwards4b jedwards4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that you neglected to add the new module shr_is_restart_fh_mod.

@@ -179,6 +189,7 @@ subroutine med_phases_restart_write(gcomp, rc)
real(R8) :: tbnds(2) ! CF1.0 time bounds
logical :: isPresent
logical :: first_time = .true.
logical :: write_restartfh
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need an ifdef here.

@@ -14,6 +14,9 @@ module med_phases_restart_mod
use med_phases_prep_glc_mod , only : FBocnAccum2glc_o, ocnAccum2glc_cnt
use med_phases_prep_rof_mod , only : FBlndAccum2rof_l, lndAccum2rof_cnt
use pio , only : file_desc_t
#ifndef CESMCOUPLED
use shr_is_restart_fh_mod, only : init_is_restart_fh, is_restart_fh, is_restart_fh_type
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module is missing - did you git add it?

Copy link
Collaborator Author

@DeniseWorthen DeniseWorthen Dec 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be found in our CDEPS share directory (ufs/cdeps_share) which sits at the UFS-WM CDEPS interface level. This are where we have files these files

dtypes.h
shr_assert_mod.F90
shr_frz_mod.F90
shr_infnan_mod.F90

which are generated via genf90.pl for you (and which we cannot use because of restrictions by CentralOps).

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at directory cdeps/share I see files shr_assert_mod.F90.in, shr_frz_mod.F90.in and shr_infnan_mod.F90.in but no shr_is_restart_fh_mod.F90.in
or shr_is_restart_fh_mod.F90 - that file needs to go in that directory if only to enable github testing of the ufs build.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So a shr_is_restart_fh_mod.F90 inside of cdeps/share will be enough? It doesn't need to be a ".in" file, right?

@jedwards4b
Copy link
Collaborator

Yes that should be enough.

@DeniseWorthen
Copy link
Collaborator Author

DeniseWorthen commented Dec 18, 2024

I made a PR to ESCOMP/CDEPS to add the required module file.

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.

5 participants