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

Date in ocean_solo.res does not override nml as intended #1313

Closed
herrwang0 opened this issue Jan 30, 2021 · 2 comments
Closed

Date in ocean_solo.res does not override nml as intended #1313

herrwang0 opened this issue Jan 30, 2021 · 2 comments

Comments

@herrwang0
Copy link
Contributor

https://github.com/NOAA-GFDL/MOM6/blob/aee4df21e19ff1b816a40bd55bafb84f12e2b014/config_src/solo_driver/MOM_driver.F90#L254

It looks like the code is trying to locate ocean_solo.res in dirs%restart_input_dir. But if I interpreted it correctly, dirs is not yet assigned here.

I guess a hotfix could be simply adding something like

call get_MOM_input(dirs=dirs)

right before the line in question (in which case obviously get_MOM_input needs to be imported from MOM_get_input module).

@marshallward
Copy link
Collaborator

Sorry for only just now looking into this, I think we've all had a lot of distractions in the last two weeks.

I think I see what you are saying. In the solo driver, dirs is an internal variable for initialize_MOM, passed into get_MOM_input call, and is then an output back to the driver who called the initialization. Except this call is on L299, ~50 lines after the block mentioned above.

Unsurprisingly, none of our tests ever evaluate this block:

https://codecov.io/gh/NOAA-GFDL/MOM6/src/dev%2Fgfdl/config_src/solo_driver/MOM_driver.F90#L256

So I think you have a good point. Perhaps there was never an expectation of a calendar change in the middle of a set of runs.

I'll run it past the others and see what the intended behavior is here. Thanks very much for noticing this.

@Hallberg-NOAA
Copy link
Collaborator

@herrwang0, I think that your proposed fix of adding

call get_MOM_input(dirs=dirs)

right before the line that first uses the value of dirs%restart_input_dir is actually a very good solution. FMS reads all of the namelist files from a single processor and then broadcasts it when it starts up, so this is not an expensive solution. The one thing extra that I would do is to add a comment before this new line to the effect that
! The contents of dirs will be reread in initialize_MOM.

There is a similar issue in ice_solo_driver/ice_shelf_driver.F90, but the other drivers and caps seem to be fine. In the case of ice_solo_driver/ice_shelf_driver.F90, the solution is to move the line call get_MOM_input(param_file, dirs) so that it occurs before the first test in that file that references dirs%restart_input_dir .

@herrwang0, if you could, I would appreciate it if you would put in a PR with your solution to this issue, along with the analogous change to ice_solo_driver/ice_shelf_driver.F90.

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

No branches or pull requests

3 participants