Output NEMO sections / transects. DIADCT

Good afternoon

I’d like to output the transport through sections from NEMO 4.2. I’ve made the “sections” file using the SECTIONS tool and set ln_diadct = .true. in the namelist.

But when I run, I get an error from XIOS saying the “mfo” does not exist. And it does not.
NEMO has a line
CALL iom_put(“mfo”, vol_transport)
but there is no “mfo” defined in field_def_nemo-oce.xml. So XIOS crashes for good reason.

Instead, the field-def_nemo-oce.xml file has some definitions to try and make XIOS calculate transports from uoce, but I don’t understand how it is supposed to work.
If I comment out everything inside the “ifdef key_xios” in diadct, then NEMO runs fine and writes transports to a text file.

Is there a way to write the transport sections output via XIOS? Is it not working in NEMO 4.2 or am I missing something in the settings?

Cheers
/Joakim

Hi Joakim!

I managed to make DIADCT produces numbers via XIOS by adding these new entries in field_def_nemo-oce.xml:

<field_group id="DCT" grid_ref="grid_TRO">
    <field id="mfo"          long_name="Volume transports through sections"  standard_name="vol_transport"          unit="Sv" />
    <field id="hfo"          long_name="Heat transports through sections"  standard_name="heat_transport"         unit="PW" />
    <field id="sfo"          long_name="Salt transports through sections"  standard_name="salt_transport"         unit="Gg/s"  />
</field_group>

and then, in file_def_nemo-oce.xml:

<file id="file42" name_suffix="_strait_oce" description="transport variables through straits" >
     <field field_ref="mfo"                    name="mfo"         level="0" / 
<!-- <field field_ref="masstr_strait"    name="mfo"         level="1" />  -->
</file>

It should work OK with your config, as you managed to write transports into files.

As you can see, I commented out the variable masstr_strait because I’m not sure how it works. It’s linked to maskMFO_[uv]. And it’s also used for sea ice mass transports across straits. I’m also curious to know why there are these definitions in the XML files.

On my side, I’d like to use DIADCT to output Omon.mfo and SImon.simassacrossline as per the CMIP7 data request. So far, I’ve been trying to stitch transects around the north fold in the orca grid. I’m interested in your work.

Cheers,

Jean S.

Hi Jean

Thanks for the tip. I gave this a try but I’m missing the definition of grid_TRO. Did you define this yourself in grid_def.xml? Could you share this?

If we have something that works, then perhaps it could be put into NEMO 4.2 as a bugfix.

Cheers
/J

Sorry, I forgot the part with the grid definition. In grid_def_nemo.xml around here, I added the following:

<grid id="grid_TRO">
    <axis axis_ref="nstrait"/>
</grid>

Then, nstrait is already defined through cfgs/SHARED/axis_def_nemo.xml. And you can track that variable in NEMO in src/OCE/IOM/iom.F90.

I haven’t defined an equivalent grid for the ice transects, but I think it should similar to grid_TRO.

Cheers,

Jean