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

pkg DIC using 3-D calcite-saturation: wish list #678

Open
jm-c opened this issue Dec 7, 2022 · 2 comments · May be fixed by #718
Open

pkg DIC using 3-D calcite-saturation: wish list #678

jm-c opened this issue Dec 7, 2022 · 2 comments · May be fixed by #718

Comments

@jm-c
Copy link
Member

jm-c commented Dec 7, 2022

Now that pkg/dic allows to read-in 3-D silicate input file (see PR #620), it would be helpful to get the Calcite-saturation with 3-D pH calculation tested in one verification experiment.
To make this easier, I suggest the following:

  1. Have a pkg/dic run-time parameter to allow to use or not calcite-saturation once the code has been compiled with #define CAR_DISS. Currently this can only be turned on/off at compile time, preventing a single experiment to run both with and without it (with a primary and secondary tests that use the same execuatable).
  2. May be rename "CAR_DISS" using a more explicit name, starting with "DIC_" ?
  3. Put 3-D silica arrays with #ifdef CAR_DISS (or updated new name) so save memory.
  4. Could also speed up compilation by using the same CPP option to empty S/R CALCITE_SATURATION and CAR_FLUX_OMEGA_TOP when it's not defined.
  5. Change the condition around call to 2 S/R above: using a run-time "Freq" type parameter with function DIFFERENT_MULTIPLE and removing the "myIter .lt. (nIter0+5) .or." part which will break the restart.
  6. Test restart ; can restart be improved if we store 3-D pH in pickup file ?
jm-c added a commit to HannahKleppin/MITgcm that referenced this issue Dec 8, 2022
jm-c added a commit that referenced this issue Dec 9, 2022
* Read in prescribed 3d silicate fields for calculation of pH

* Update data.dic

* Update dic_fields_load.F

* Update dic_readparms.F

* Update data.dic

* Update dic_surfforcing_init.F

* Update DIC_VARS.h

* Update dic_ini_forcing.F

* Update dic_fields_load.F

* introduce SILICAdeep/SILICAsurf arrays to prevent issues when SILICA array changes shape

* move nCALCITEstep from dic_biotic_forcing to runtime parameter in seconds rather than timesteps

* Add diagnostics to output 3d Si, pH, pCO2, carbonate and saturation state fields from S/R calcite_saturation

* Fix segfault in test due to improper use of S/R LEF_ZERO

* Restore original OPTIONS file and "data.dic"

Bring back original pkg/dic OPTIONS file to keep default unchanged.
And for now, keep experiment "tutorial_global_oce_biogeo" unchanged,
might test 3-D silica file in an other set-up.

Also rename new input binary file (suffix "RS" is meaningless, but this
file is not used anymore)

* Update to process 3-D silicate input file

* finish replacing "silica" --> "silicaSurf"

+ minor cleaning in pkg/dic store-dir headers

* Simplify for the adjoint:

when compiling pkg/autodiff, disable the use of 3-D silica for surface silica value

* Restore initialisation as done in master branch

Unconditinal initialisation matters (for TAF adjoint)

* Cleaning: improve indentation

also remove one trailing blank

* Cleaning

- remove trailing blanks
- more consistent upper/lower writing of variable

* adjust new diags parser code + cleaning

* remove duplicate copies (save space)

* Revert back addition of new run-time param "nCALCITEstep"

see issue #678

* improve indentation

* remove un-used 3-D silica file

* document loading 3D silicate input file in pkg/dic

Co-authored-by: Jonathan Lauderdale <jonathan.lauderdale@gmail.com>
Co-authored-by: Jean-Michel Campin <jmc@mit.edu>
Co-authored-by: Jean-Michel Campin <jmc@ocean.mit.edu>
@jm-c
Copy link
Member Author

jm-c commented Feb 9, 2023

All points listed in this issue have been addressed in PR #683 with the exception of point-6.

@seamanticscience
Copy link
Member

seamanticscience commented Aug 10, 2023

I made a new PR #759 with the minor bug fixes to carbonate dissolution rates.

@jm-c is rearranging pkg/dic initialization (#757) to enable 3d pH pickups (either in #718 or a new PR?)

@jm-c jm-c linked a pull request Apr 22, 2024 that will close this issue
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 a pull request may close this issue.

2 participants