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

Base time #937

Merged
merged 22 commits into from
Mar 21, 2022
Merged

Base time #937

merged 22 commits into from
Mar 21, 2022

Conversation

uramirez8707
Copy link
Contributor

Description
Currently, base_time, base_year, base_month, base_day, base_hour, base_minute, base_second are PUBLIC module variables, that can be changed at any point. They are set in diag_table_mod when the diag_table is read.

Note: The base_time IS used in model code, in places like:
https://github.com/NOAA-GFDL/atmos_phys/blob/80d0a701d9772e23f44e6163cfd22ec0d762d0d9/atmos_param/radiation/radiative_gases/radiative_gases.F90#L2258

This PR:

  1. changes these to PRIVATE and adds getters for each variable
  2. get_base_time is made public by diag_manager to reproduce previous behavior:
  3. Adds a set_base_time routine which sets these variables as it was done in diag_table_mod
  4. A private logical module variable, base_time_set, prevents users from changing them
  5. The set_base_time routine is then called in diag_table_mod when reading the diag_table and in fms_diag_yaml when reading the yaml file
  6. A test was added to test this routine.

How Has This Been Tested?
CI Passes which includes a test for this
c96L33_am4p0 experiment still reproduces with this branch (as is) intel prod-openmp, debug

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • New check tests, if applicable, are included
  • make distcheck passes

@uramirez8707 uramirez8707 marked this pull request as ready for review March 17, 2022 16:42
@thomas-robinson thomas-robinson merged commit b3dd78b into NOAA-GFDL:dmUpdate Mar 21, 2022
@uramirez8707 uramirez8707 deleted the base_time branch May 18, 2022 14:21
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.

2 participants