mom-ocean / MOM5

The Modular Ocean Model
https://mom-ocean.github.io/
GNU Lesser General Public License v3.0
82 stars 95 forks source link

new diagnostic: dzt_on_rho has non-positive axis_id #385

Open rfarneti opened 5 months ago

rfarneti commented 5 months ago

Dear All, the MOM5 Google group seems to be down (perhaps because of all the recent spam messages?). I will place my question here if you don't mind. I am trying to introduce a new diagnostic, dzt_on_rho, to save dzt, and eventually other thickness quantities, on potential density surfaces. I am following what is done in src/mom5/ocean_diag/ocean_tracer_diag.F90 for diagnose_tracer_on_rho. The need for this diagnostic is to try to avoid remapping dzt onto pot_rho offline.

Changes on ocean_thickness.F90 compile, but when testing it I keep getting the following error:

diag_manager_mod::register_diag_field: module/output_field ocean_model/dzt_on_rho has non-positive axis_id

meaning that axes are not passed.

I do not seem to find the (probably obvious) mistake. Could somebody provide some advice or hint? My ocean_thickness.F90 is here:

https://github.com/rfarneti/MOM5/blob/master/src/mom5/ocean_core/ocean_thickness.F90

Thanks! Riccardo

rmholmes commented 5 months ago

Hi Riccardo,

It has been a while since I thought about any of this...but...

For your specific case, could you just use the mass_t_on_nrho diagnostic (computed in ocean_tracer.f90), and then divide by the area?

More generally, in the past I've added quite a few new neutral density-binned (or in my case, temperature-binned) diagnostics, mostly in my own branches. However, some of my commits might help you track down whether you've missed something. E.g., this commit seems to be reasonably clean and adds a new diagnostic sigma_diff_on_nrho to bin the sigma_diff heat budget term.

StephenGriffies commented 5 months ago

Yes @rfarneti , I had to shut down the MOM Google group. There were about 40K spams, and Google only lets you delete 30 at a time (argh!). It would have taken hours to delete them all, so I had to jettison the group. Also, the spam was just getting more and more, even after I tried filtering. Perhaps I could have salvaged the group with patience. But the 40K spams was over the top.

Also, it seems that Github is a more reliable place to post queries anyhow, though it was a shame to shut down the Google group.

About your diagnostic: @rmholmes idea of computing your thickness diagnostic by dividing mass_on_nrho by area is a good one (will also need to divide by rho0). See if that does the trick for you.

rfarneti commented 5 months ago

Hi @StephenGriffies and @rmholmes , thanks for the feedback. I will try what suggested by Ryan (and thanks for pointing me to your commits!). But I also need to understand what I am missing in my new diagnostic for any future development. Cheers