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

"o2_tendency" and "dic_tendency" are missing value in diagnostics #226

Open
favorliao opened this issue Apr 11, 2018 · 21 comments
Open

"o2_tendency" and "dic_tendency" are missing value in diagnostics #226

favorliao opened this issue Apr 11, 2018 · 21 comments

Comments

@favorliao
Copy link

Hi,

I want to diagnose o2 and dic budget in MOM6. However, the diagnostics (nc files) shows all the o2_tendency and dic_tendency are missing values. Regarding other terms in equation (e.g., o2_vmove, o2_vdiffuse_impl, and o2_vdiff), there are normal values in 10-90N and missing values in other regions (10N-90S). Is there any solution for this problem?

Thanks,

Enhui

@ashao
Copy link
Collaborator

ashao commented Apr 11, 2018

From your description it sounds like o2_tendency and dic_tendency are registered, but never posted anywhere. Can you clarify a few things?

  1. Which biogeochemical model are you using?
  2. For the other diagnostics are you saying that only the northern hemisphere has sensible values?
  3. Could you point to a run that's exhibiting this behavior?

@favorliao
Copy link
Author

favorliao commented Apr 11, 2018

  1. The biogeochemical model is latest COBALT.
  2. Yes. The northern hemisphere has sensible value and southern hemisphere has missing values.
  3. How to point to a run? The run is in Princeton cluster with latest MOM6 and COBALT model. It is an ocean forced run and forcing is JRA interannual forcing.

@ashao
Copy link
Collaborator

ashao commented Apr 11, 2018

If the run isn't on GFDL's Gaea, could you post the diag_table, MOM_parameter.short, and input.nml to https://gist.github.com/?

@MJHarrison-GFDL
Copy link
Contributor

This sounds like there may have been a problem with the Tiger cluster. Can you verify that this is reproducible on your cluster? If so, then we need to determine if this is a problem with tendency diagnostics for generic tracers in MOM6 or if the problem is specific to the COBALT package. Knowing if any of the tracer tendency diagnostics are correct (e.g. in BLING, or CFCs) would be helpful as well.

@favorliao
Copy link
Author

favorliao commented Apr 12, 2018

As matt suggested, I tested it again that the problem is not reproducible on my cluster. It seems like some region has reasonable values and some region not. Not reproducible means the output files not always has reasonable value in specific region. Sometimes, it has value in region A, but sometimes not. For other variable, such as "dic" concentration, there is not this problem.

image

The diag_table, MOM_parameter.short, and input.nml is https://gist.github.com/favorliao/944c1da74b7ebbc96ee0efd1b4e6dc81

@ashao
Copy link
Collaborator

ashao commented Apr 12, 2018

@favorliao, I think I'm a little confused. Did you run the model again and now you have some values for DIC tendency whereas before you did not? Also that output looks strange, is what you're plotting from the remapped diagnostic output or the native hybrid-coordinate?

@MJHarrison-GFDL, if I remember correctly, I think there's a CPP flag in the generic tracer package that controls whether the MOM6 wrapper of the diag manager or the FMS diag manager is used. Am I correct in assuming that CM4/ESM4 uses the MOM6 wrapper?

@favorliao
Copy link
Author

@ashao , I run the model again and I have some values for DIC tendency whereas before I did not. The results are remapped diagnostic output. I am going to run again to see native hybrid-coordinate.

@favorliao
Copy link
Author

I double check there is the same problem in the native hybrid-coordinate.

@MJHarrison-GFDL
Copy link
Contributor

I just spoke with @nikizadehgfdl and he informed me that the CPP flag "_USE_MOM6_DIAG" is enabled in ESM4 in order to get correct remapped diagnostics - so this is worth a try

@favorliao
Copy link
Author

I just check the compilation file and I found the "_USE_MOM6_DIAG" is used in my current run. Do I need to try a run without "_USE_MOM6_DIAG"?

The compilation is:
(cd $BUILDDIR; rm -f path_names; \ "$BASEDIR/src/mkmf/bin/list_paths" ./ "$BASEDIR/src/MOM6/config_src/{dynamic,coupled_driver}" "$BASEDIR/src/MOM6/src/{*,*/*}/" "$BASEDIR/src/{atmos_null,coupler,land_null,ice_ocean_extras,icebergs,SIS2,FMS/coupler,FMS/include}/" "$BASEDIR/src/ocean_shared/{generic_tracers,mocsy/src}") (cd $BUILDDIR; \ "$BASEDIR/src/mkmf/bin/mkmf" -t $MKF_TEMPLATE -o '-I../../shared/repro' -p MOM6beta2 -l '-L../../shared/repro -lfms' -c '-Duse_libMPI -Duse_netCDF -DSPMD -Duse_AM3_physics -D_USE_LEGACY_LAND_ -D_USE_MOM6_DIAG -D_USE_GENERIC_TRACER -DUSE_PRECISION=2' path_names )

@MJHarrison-GFDL
Copy link
Contributor

What you have should be correct .

@ashao
Copy link
Collaborator

ashao commented Apr 12, 2018

To narrow down whether this is a problem with the generic tracer package or with MOM6, could you try outputting the ocean_model calculation of the tendency? For example replace

 "generic_cobalt_z","o2_tendency", "o2_tendency", "hist_newMOM_diag_o2_month_%4yr_%3dy", "all", "mean", "none", 2

with

 "ocean_model_z","o2_tendency", "o2_tendency", "hist_newMOM_diag_o2_month_%4yr_%3dy", "all", "mean", "none", 2

@favorliao
Copy link
Author

favorliao commented Apr 12, 2018

I just finished the run. There is no "o2_tendency" variable in the output file. I think the reason is "o2_tendency" is not registered in ocean_model. According to "available_diags.000000", "o2_tendency" only register in generic_cobalt.

`"generic_cobalt", "o2_tendency" [Unused]
! long_name: Generic tracer tendency of o2
! units: mole/m^2/s
! cell_methods: xh:mean yh:mean zl:mean area:mean

"generic_cobalt", "o2_tendency_xyave" [Unused]
! long_name: Generic tracer tendency of o2
! units: mole/m^2/s
! cell_methods: zl:mean

"generic_cobalt_z", "o2_tendency" [Unused]
! long_name: Generic tracer tendency of o2
! units: mole/m^2/s
! cell_methods: xh:mean yh:mean z_l:mean area:mean

"generic_cobalt_z", "o2_tendency_xyave" [Unused]
! long_name: Generic tracer tendency of o2
! units: mole/m^2/s
! cell_methods: z_l:mean

"generic_cobalt_rho2", "o2_tendency" [Unused]
! long_name: Generic tracer tendency of o2
! units: mole/m^2/s
! cell_methods: xh:mean yh:mean rho2_l:mean area:mean`

@ashao
Copy link
Collaborator

ashao commented Apr 13, 2018

I was just looking through the code and it doesn't look like the oxygen tendency is calculated anywhere in COBALT and I can't see where the dic_tendency diagnostic is registered in generic_tracers or where any cell-by-cell tendencies are calculated, so I have questions as to what is actually being output in the plots that @favorliao made.

I think the easiest thing to do would be to get MOM6 to post these diagnostics since the tracer registry is already setup to calculate most of the physical ones (https://github.com/NOAA-GFDL/MOM6/blob/dev/gfdl/src/tracer/MOM_tracer_registry.F90). Something in generic tracer would still be responsible for any column-related tendencies (sources/sinks and vertical difffusion come to mind).

@nikizadehgfdl
Copy link
Contributor

@favorliao could you try the following code change in MOM6/src/tracer/MOM_generic_tracer.F90 line 199 :

-                              registry_diags=.false., &   !### CHANGE TO TRUE?
+                              registry_diags=.true., &   !### CHANGE TO TRUE?

And then change the module for the tendency diagnostics in diag_table to "ocean_model", .e.g.,

 "ocean_model", "o2_tendency",        "o2_tendency",         "ocean_annual","all","mean","none",2
 "ocean_model", "dic_tendency",        "dic_tendency",         "ocean_annual","all","mean","none",2

Let us know if that works.

@favorliao
Copy link
Author

@nikizadehgfdl It works after I change the "registry_diags" from false to true. Thanks a lot! The output shows no more missing values and the order of magnitude seems plausible when I compare it with time difference of o2 field.

@favorliao
Copy link
Author

Hi,
May I ask one more question? Since I want to diagnose tracer (e.g., o2) budget, I output the "o2_diffx_2d". However, there is a similar issue that "o2_diffx_2d" has missing value. Does anyone know the solution?

Enhui

@ashao
Copy link
Collaborator

ashao commented Apr 16, 2018

Is the diagnostic registered with 'ocean_model' and NOT 'ocean_model_z' or 'generic_cobalt'?

@favorliao
Copy link
Author

@ashao The diagnostic "o2_diffx_2d" registered with "ocean_model".

@adcroft
Copy link
Member

adcroft commented Apr 26, 2018

Is this resolved?

@nikizadehgfdl
Copy link
Contributor

No. The user has a code patch, but I did not make a PR since the fix has to be first evaluated in ESM4 to make sure it doesn't harm the current cmip6 diagnostics.

marshallward added a commit that referenced this issue Apr 6, 2023
- NOAA-GFDL/MOM6@fc823f5d7 Merge branch 'main' into merge_main_20230405
- NOAA-GFDL/MOM6@a6f813e05 (*)Fix MOM_calc_grad_Coriolis GLOBAL_INDEXING bug
- NOAA-GFDL/MOM6@1e54bed6a Merge pull request #1594 from NCAR/dev-ncar-main-candidate-2023-03-02
- NOAA-GFDL/MOM6@d1d53bcb4 remove inadvertent reassignment of layer_frac
- NOAA-GFDL/MOM6@ed93a232a  add SMOOTH_RI to MOM_obsolete_params.F90
- NOAA-GFDL/MOM6@774074ff9 minor styling fixes to address PR #1594 reviews.
- NOAA-GFDL/MOM6@9786710c3 Merge pull request #235 from mom-ocean/main
- NOAA-GFDL/MOM6@c142e4c39 Merge pull request #231 from jedwards4b/cesm_logging_improvements
- NOAA-GFDL/MOM6@4959ee12f update more write units to stdout in mom6 nuopc cap and let only rootpe write logs.
- NOAA-GFDL/MOM6@b693dd2d8 remove more direct calls to FMS in mom_cap.F90
- NOAA-GFDL/MOM6@1dce6df13 merge latest dev/ncar and resolve conflicts
- NOAA-GFDL/MOM6@5b274bbde Merge pull request #234 from alperaltuntas/fix_gnu_restart
- NOAA-GFDL/MOM6@0f1fc0386 fix gnu restart issue by removing leading spaces in restartfiles list
- NOAA-GFDL/MOM6@9d5d9bb40 Merge pull request #233 from marshallward/siglongjmp_name_fix
- NOAA-GFDL/MOM6@de8023d10 POSIX: siglongjmp and sigsetjmp_missing fixes
- NOAA-GFDL/MOM6@7f024685f Merge pull request #229 from gustavo-marques/merge_main_08Dec22
- NOAA-GFDL/MOM6@a789254e0 get the variable name correct
- NOAA-GFDL/MOM6@8bc69f67e further improvement to logunit setting
- NOAA-GFDL/MOM6@cac67d1e7 revert change to github action
- NOAA-GFDL/MOM6@12238ae21 remove whitespace
- NOAA-GFDL/MOM6@7824dcec7 switch to openmpi for github tests
- NOAA-GFDL/MOM6@a80b91ded use more cesm style logging
- NOAA-GFDL/MOM6@380864138 Switch from mpich to openmpi
- NOAA-GFDL/MOM6@ed252790d Merge branch 'dev/ncar' into main_08Dec22
- NOAA-GFDL/MOM6@1eb6be9c8 Merge pull request #222 from NCAR/willy_tracer
- NOAA-GFDL/MOM6@4840c6fdb Merge pull request #226 from gustavo-marques/fix_diags_docs
- NOAA-GFDL/MOM6@d5bd437b7 Merge pull request #225 from gustavo-marques/multiple_ri_smooth
- NOAA-GFDL/MOM6@0cf34d352 Fix string order in regional_section
- NOAA-GFDL/MOM6@b4440417c Adds option to smooth gradient Ri multiple times
- NOAA-GFDL/MOM6@09278521c Modify gradient Richarson number diagnostics
- NOAA-GFDL/MOM6@cfd7c0bde Rename parameter SMOOTH_RI to N_SMOOTH_RI
- NOAA-GFDL/MOM6@fe3cb4d69 Merge pull request #224 from gustavo-marques/merge-dev-gfdl-candidate-main-2022-08-10
- NOAA-GFDL/MOM6@36487d828 Merge branch 'main' into merge-dev-gfdl-candidate-main-2022-08-10
- NOAA-GFDL/MOM6@0b5cd6ff7 Merge pull request #223 from mom-ocean/main
- NOAA-GFDL/MOM6@dfb37154a Changed parameter reference for ideal_age_physics to Hbl=Hml
- NOAA-GFDL/MOM6@e300296ac Changed GV%nkbl back to GV%nkml
- NOAA-GFDL/MOM6@5ac624241 All references to "mixed layer" in the ideal age module now refer to "boundary layer" instead.
- NOAA-GFDL/MOM6@0d86acd52 Shortened line length to make dOxygen happy
- NOAA-GFDL/MOM6@2428684ac !! ---->  !<
- NOAA-GFDL/MOM6@f415a7f5c Shortens a line and removes whitespace
- NOAA-GFDL/MOM6@bb02a51be A new tracer that keeps track of "mixed layer age" has been added to the ideal age module. This PR also adds the ability to use the actual BL depth that is diagnosed by the active BL scheme inside the ideal age module (for all ideal age tracers).
- NOAA-GFDL/MOM6@d9ec82e4d Merge branch 'mom-ocean:main' into dev/ncar
- NOAA-GFDL/MOM6@605771423 Follow MOM6 code style guide
- NOAA-GFDL/MOM6@8e833d4d9 Add missing units
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

5 participants