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

nuopc_driver updates #22

Merged
merged 32 commits into from
Apr 15, 2020

Conversation

DeniseWorthen
Copy link
Collaborator

@DeniseWorthen DeniseWorthen commented Apr 13, 2020

Resolves issue #16:

When running with the CMEPS mediator, MOM6 restarts are controlled via nems.configure settings restart_option (eg. hours, days) and restart_n (eg 24, 1). Intermediate restarts are written with timestamped file names. Final restarts are written without timestamped file names.

When running with the NEMS mediator, no intermediate restarts are written. This replicates current behavior. Intermediate restarts for the NEMS mediator can be implemented by adding the above two settings (restart_n and restart_option) to the warm start nems.configure figure for NEMS.

Resolves issue #15:

When running with DumpFields=True, all fields in the import or export state are written to files which are timestamped with the import or export time. This is a change in current behavior where all timesteps for each field in the import or export state is written to a separate file.

Resolves issue #21:

The call to data_override for lrunoff is moved outside the enclosing do loop. This does not change answers.

All CCPP prod regression tests were run and passed. Log file is attached.
rtreport.txt

authors:
@DeniseWorthen
@mvertens

DeniseWorthen and others added 30 commits November 26, 2019 09:08
in mom_ocean_model_nuopc to not write restart if
false
and heat_content_frunofaf; remove un-used data_get
interface
@SMoorthi-emc
Copy link

SMoorthi-emc commented Apr 13, 2020 via email

@DeniseWorthen
Copy link
Collaborator Author

@SMoorthi-emc : I am referring to the regression test system and to the dev/emc branch of MOM6. I realize you have made modifications to obtain MOM6 intermediate restarts in your system. As far as I know, those modifications have never been merged back to MOM6 or to ufs-s2s-model.

@jiandewang
Copy link
Collaborator

Denise:
Can you point me to your run directory on HERA?
Jiande

@DeniseWorthen
Copy link
Collaborator Author

The run directory is here: /scratch1/NCEPDEV/stmp2/Denise.Worthen/RTs/rtgen.62842/tmp

@jiandewang
Copy link
Collaborator

jiandewang commented Apr 13, 2020 via email

@JessicaMeixner-NOAA
Copy link
Collaborator

@jiandewang There were no updates to ufs-s2s-model to turn on the new mediator restart dump features for NEMS. I'm going to make a run later today (unless you want to do it and can sooner than I can) to test the intermediate restarts for NEMS and will point you to those.

@DeniseWorthen
Copy link
Collaborator Author

When running using the nems mediator, it reproduces the current behavior. It does not read the restart_n or restart_option from nems_configure. It will default instead to just writing the restart at the end as it does currently.

Jessica is going to confirm that adding those options to nems.configure for the nems mediator works correctly. But I didn't add them because I didn't want to do a PR on ufs-s2s-model.

@jiandewang
Copy link
Collaborator

@JessicaMeixner-NOAA: understood now, will wait for your results. HERA is saturated most of the time, doesn't matter who s going to run.

@JessicaMeixner-NOAA
Copy link
Collaborator

@jiandewang the intermediate restarts worked.

Code: /scratch2/NCEPDEV/climate/Jessica.Meixner/ufs-s2s-mom6restart
To see outputs:
[Jessica.Meixner@hfe04 MOM6_RESTART]$ pwd
/scratch1/NCEPDEV/stmp2/Jessica.Meixner/scrub/rtgen.18782/tmp/cpld_fv3_ccpp_384_mom6_cice_1d_bmark_rt/MOM6_RESTART
[Jessica.Meixner@hfe04 MOM6_RESTART]$ ls
MOM.res_1.nc MOM.res.nc ocn.mom6.r.2013-04-01-12-00-00_3.nc ocn.mom6.r.2013-04-02-00-00-00_2.nc
MOM.res_2.nc ocn.mom6.r.2013-04-01-12-00-00_1.nc ocn.mom6.r.2013-04-01-12-00-00.nc ocn.mom6.r.2013-04-02-00-00-00_3.nc
MOM.res_3.nc ocn.mom6.r.2013-04-01-12-00-00_2.nc ocn.mom6.r.2013-04-02-00-00-00_1.nc ocn.mom6.r.2013-04-02-00-00-00.nc

Copy link
Collaborator

@JessicaMeixner-NOAA JessicaMeixner-NOAA left a comment

Choose a reason for hiding this comment

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

Works for NEMS and CMEPS

@DeniseWorthen
Copy link
Collaborator Author

DeniseWorthen commented Apr 14, 2020 via email

@SMoorthi-emc
Copy link

SMoorthi-emc commented Apr 14, 2020 via email

@SMoorthi-emc
Copy link

SMoorthi-emc commented Apr 14, 2020 via email

@DeniseWorthen
Copy link
Collaborator Author

I understand about the desire to have the restart filename with a timestamp. I was only referring to the fact that the intermediate restarts Jessica obtained were "ocn.mom6.r."+date.nc. That is the CESM style restart name. For our implementation, we had been using MOM6 restarts with the root name MOM.res, so for CMEPS outside of CESM, I had used that as the root name.

@SMoorthi-emc
Copy link

SMoorthi-emc commented Apr 14, 2020 via email

@JessicaMeixner-NOAA
Copy link
Collaborator

For MOM6 you can specify what name the restart folder that the restarts are being written into, so it can be OCN_RESTART or MOM6_RESTART or any other name. That feature has not changed.

So now leaving workflow issues to the side, is there an issue with what we have for MOM6 intermediate restarts when running with the NEMS or CMEPS mediator using the top of ufs-s2s-model develop branch + this MOM6 from the PR? I think we need to add a few more details so that we are all on the same page. So instead of saying timestamp or date, I will say "YYYY" "MM" "DD" "HH" "mm" "SS" to represent year, month, day, hour, minute and second. For intermediate restarts we have //${prefix}.YYYY-MM-DD-HH-mm-SS*.nc and then for the last restart, there is no time stamp and they are the typical MOM.res*.nc with no date or timestamp information. For the NEMS mediator the prefix was "ocn.mom6.r." however when using the CMEPS mediator, that will switch to "MOM.res". The prefix was a surprise to Denise, but we still have YYYYMMDDHHmmSS information, which I believe we all agree is a need. However, I don't understand what you think needs to be addressed for this MOM6 PR @SMoorthi-emc that are not workflow issues?

@SMoorthi-emc
Copy link

SMoorthi-emc commented Apr 14, 2020 via email

@DeniseWorthen
Copy link
Collaborator Author

I would like to go ahead and fix the root name issue for running with the nems mediator and with the configuration variables added to the nems.configure. So when hera comes back I will test a fix and then push to the PR again.

Thanks everyone.

@DeniseWorthen
Copy link
Collaborator Author

I re-ran the c96 cold and 2d CCPP prod tests, adding only the settings restart_n=12 and restart_option=nhours to the nems.configure for the warm start. We don't write restarts for the cold start in any case.

The MOM6 restarts were correctly named: /scratch1/NCEPDEV/stmp2/Denise.Worthen/RTs/rtgen.301652/tmp/cpld_fv3_ccpp_mom6_cice_2d_atm_flux/MOM6_RESTART

I made no changes to the code; it looks like Jessica's test was run w/o pointing to the right MOM6 branch, which explains why she still obtained the CESM style root name.

@JessicaMeixner-NOAA
Copy link
Collaborator

@DeniseWorthen you are correct, I did not run with the right code. Sorry about that! I'm glad it's all working as expected though.

@DeniseWorthen DeniseWorthen merged commit 8d565cc into NOAA-EMC:dev/emc Apr 15, 2020
DeniseWorthen added a commit to DeniseWorthen/MOM6 that referenced this pull request Apr 16, 2020
@DeniseWorthen DeniseWorthen deleted the feature/restartcontrol branch May 27, 2020 11:32
jiandewang pushed a commit to jiandewang/MOM6 that referenced this pull request Jun 17, 2021
jiandewang pushed a commit to jiandewang/MOM6 that referenced this pull request Jun 6, 2022
* initial hooks for stochastic EOS modifications

* remove debug statements

* add documentation

* Change ampltiude from 0.39 to sqrt(.39)

* remove global_indexing logic from stoch_eos_init

* switch to using MOM_random and add restart capability

* update random sequence to update each each time-step

* remove tseed0 from MOM_random (leftover from debugging)

* Added necessary submodules and S^2, T^2 diagnostics to MOM_diagnostics

* Added diagnostics for outputting variables related to the stochastic parameterization.

* Diagnostics in MOM_PressureForce_FV updated for stochastic (rather than deterministic) Stanley SGS T variance parameterization.

* Added parentheses for reproducibility.

* Changed diagnostics to account for possible absence of stoch_eos_pattern in MOM_PressureForce_FV,
when deterministic parameterization is on.

* remove mom6_da_hooks and geoKdTree from pkg

* add stochastic compoment to MOM_thickness_diffuse

* fix array size declaration and post_data

* Corrected indexing of loops in MOM_calc_varT

* Changed how parameterization of SGS T variance (deterministic and stochastic) is switched on in PGF and thickness diffusion codes

* Corrected a few typos

* Cleaned up indices, redundant diagnostic, printing

* Fixed diagnostic IDs

* Fixed diagnostics typo

* Corrected indices in calculation of tv%varT

* Minor index fix

* Corrected bug in pressure in Stanley diagnostics

* Fixed whitespace error

* Stoch eos clock (#5)

*Added a clock for the Stanley parameterization

Co-authored-by: jkenigson <jkenigso@gmail.com>

* add halo update to random pattern

* Update MOM_stoch_eos.F90

Fix bug for looping over compute domain (is -> isc etc.)

* Avoid unnessary computations on halo (MOM_stoch_eos) and code clean-up (MOM_thickness_diffuse)

* Removed halo updates before determ param calc

* Update MOM_stoch_eos.F90

Removed unnecessary code

* Bug - indices are transposed

* Changed Stanley stochastic coefficient from exp(X) to exp(aX) (#9)

* Changed Stanley stochastic coefficient from exp(X) to exp(aX)

* Extra spaces removed

* Stoch eos init fix (#10)

* Don't bother calculating tv%varT if stanley_coeff<0

* Missing then added

* Merge Ian Grooms Tvar Discretization (#11)

* Update MOM_stoch_eos.F90

In progress updating stencil for$ | dx \times \nabla T|^2$ calculation

* New discretization of |dx\circ\nablaT|^2

Co-authored-by: Ian Grooms <ian.grooms@colorado.edu>

* Multiplied tvar%SGS by grid cell thickness ratio

* Added limiter for tv%varT

* Stoch eos ncar linear disc (#12)

* Update MOM_stoch_eos.F90

In progress updating stencil for$ | dx \times \nabla T|^2$ calculation

* New discretization of |dx\circ\nablaT|^2

* AR1 timescale land mask

Adds land mask to the computation of the AR1 decorrelation time

* Update dt in call to MOM_stoch_eos_run

The call to `MOM_stoch_eos_run` (which time steps the noise) is from within `step_MOM_dynamics`. `step_MOM_dynamics` advances on time step `dt` (per line 957), but the noise is updated using `dt_thermo`. It seems more appropriate to update the noise using `dt`, since it gets called from within `step_MOM_dynamics`.

* Fixed the units for r_sm_H

* Remove vestigial declarations

The variables `hl`, `Tl`, `mn_T`, `mn_T2`, and `r_sm_H` are no longer used, so I removed their declarations and an OMP private clause

Co-authored-by: Ian Grooms <ian.grooms@colorado.edu>

* Update MOM_thickness_diffuse.F90

Changed index for soft convention

* Update CVMix-src

* Ensure use_varT, etc., initialized

* Don't register stanley diagnostics if scheme is off

* Stanley density second derivs at h pts (NOAA-EMC#15)

* Change discretization of Stanley correction (drho_dT_dT at h points)

* Limit Stanley noise, shrink limiting value

* Revert t variance discretization

* Reverted variable declarations

* Stanley scheme in mixed_layer_restrat, vert_fill in stoch_eos, code cleanup (NOAA-EMC#19)

* Test Stanley EOS param in mixed_layer_restrat

* Fix size of TS cov, S var in Stanley calculate_density calls

* Test move stanley scheme initialization

* Added missing openMP directives

* Revert Stanley tvar discretization (NOAA-EMC#18)

* Perform vertical filling in calculation of T variance

* Variable declaration syntax error, remove scaling from get_param

* Fix call to vert_fill_TS

* Code cleanup, whitespace cleanup

Co-authored-by: Jessica Kenigson <jessicak@cheyenne1.cheyenne.ucar.edu>

* Use Stanley (2020) variance; scheme off at coast

* Comment clean-up

* Remove factor of 0.5 in Tvar

* Don't calculate Stanley diagnostics on halo

* Change start indices in stanley_density_1d

* Stanley param in MOM_isopycnal_slopes (NOAA-EMC#22)

Stanley param in MOM_isopycnal_slopes and thickness diffuse index fix

* Set eady flag to true if use_stored_slopes is true

* Cleanup, docs, whitespace

* Docs and whitespace

* Docs and whitespace

* Docs and whitespace

* Whitespace cleanup

* Whitespace cleanup

* Clean up whitespace

* Docs cleanup

* use_stanley

* Update MOM_lateral_mixing_coeffs.F90

* Adds link to another TEOS10 module

* Set Stanley off for testing

* Line continuation

Co-authored-by: Phil Pegion <38869668+pjpegion@users.noreply.github.com>
Co-authored-by: Philip Pegion <Philip.Pegion@noaa.gov>
Co-authored-by: Jessica Kenigson <jessicak@cheyenne6.cheyenne.ucar.edu>
Co-authored-by: Jessica Kenigson <jessicak@cheyenne3.cheyenne.ucar.edu>
Co-authored-by: jkenigson <jkenigso@gmail.com>
Co-authored-by: jskenigson <jessica.kenigson@colorado.edu>
Co-authored-by: Jessica Kenigson <jessicak@cheyenne1.cheyenne.ucar.edu>
Co-authored-by: Jessica Kenigson <jessicak@cheyenne5.cheyenne.ucar.edu>
Co-authored-by: Philip Pegion <ppegion@Philips-MacBook-Pro.local>
Co-authored-by: Jessica Kenigson <jessicak@cheyenne4.cheyenne.ucar.edu>
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.

4 participants