Closed treerink closed 5 years ago
The error for toce_pot (cmor name theteo) is: Numeric conversion not representable
On writing field data: thetao
In the context : nemo_server
Error when calling function ncPutVaraType(ncid, varId, start, count, data)
NetCDF: Numeric conversion not representable
Unable to write data given the location id: 917504 and the variable whose id: 9 and name: thetao
Remarkable is that if we add this line for thetao which is present in the new generated file_def_nemo-opa.xml
in the default file_def_nemo-opa.xml
in the ctrl
directory, it works.
For a fast test case this piece for daily output can be added in one of the file_def_nemo-opa.xml
file:
<file id="file40" name_suffix="_opa_grid_T_3D" output_freq="1d">
<field enabled="False" field_ref="e3t" grid_ref="grid_T_3D" id="id_1d_thkcello" name="thkcello"> </field>
<field enabled="True" field_ref="toce_pot" grid_ref="grid_T_3D" id="id_1d_thetao" name="thetao"> </field>
<field enabled="True" field_ref="toce" grid_ref="grid_T_3D" id="id_1d_bigthetao" name="bigthetao"> toce_e3t / e3t </field>
</file>
Testing at the SMHI machine showed that if we move a zero initialization line one line down below a line which overwrites it, we are able to output toce_pot
. The result will be that the bottom level of toce_pot
is filled with zeros (might be not intended?).
It concerns the Shaconemo MY_SRC file (see line 224):
sources/nemo-3.6/CONFIG/ORCA1L75_LIM3/MY_SRC/diaar5.F90
If
IF( nn_eos == -1 ) THEN ! ! potential temperature (TEOS-10 case)
ztpot(:,:,jpk) = 0._wp
ztpot(:,:,:) = eos_pt_from_ct( tsn(:,:,:,jp_tem), tsn(:,:,:,jp_sal) )
!
CALL iom_put( "toce_pot", ztpot(:,:,:) ) ! potential temperature (TEOS-10 case)
is replace by
IF( nn_eos == -1 ) THEN ! ! potential temperature (TEOS-10 case)
ztpot(:,:,:) = eos_pt_from_ct( tsn(:,:,:,jp_tem), tsn(:,:,:,jp_sal) )
ztpot(:,:,jpk) = 0._wp
!
CALL iom_put( "toce_pot", ztpot(:,:,:) ) ! potential temperature (TEOS-10 case)
So it is just about the line:
ztpot(:,:,jpk) = 0._wp
I will test it next week also at our HPC at KNMI, also for the other toce_pot
related variables which give problems in other data requests.
I will post an Shaconemo issue to get feedback on how this bottom layer should look like (indeed zeros) and if this is a BUG to be fixed.
With the proposed change in diaar5.F90
(see previous post) also at the KNMI HPC the problem with toce_pot
is solved, i.e. the run continues and the the fields have values for all layers except the bottom layer gives of course zeros now.
Moreover, a 2 year run with all opa and lim variables switched on (except the transect related ones, see issue 518-31 on the EC-Earth portal) finished successfully. This means the similar problems for toce_pot_mean*
are also gone.
I created a Shaconemo ticket concerning this issue (ticket 81).
@klauswyser citing your mail in the "check NaN" mail conversation:
Do I get correctly that the bottom NEMO layer doesn't matter? In that case we can close this issue.
My interpretation is that the lowest layer is never used by NEMO and no meaningful values are assigned to it. However, it would be good if somebody from the OceanWG could confirm this.
I asked Andreas here, and in the NEMO_book_3.6_STABLE.pdf (version January 2016) in Fig 4.3 it looks like the lowest level is part of the bottom and not of the ocean.
Correction Fig. 4.3 at page 53: NEMO Ocean engine Gurvan Madec, and the NEMO team ISSN No 1288-1619
Here NEMO_book_3.6_STABLE.pdf at page 55.
@treerink I suggest we move this issue to the EC-Earth portal.
At the ec-earth portal issue 518-33 and 518-35 this issue is shortly addressed. But it misses some of the points here, so it needs to add a new specific issue then.
The toce_pot fields in the file_def files which are generated by
drq2file_def-nemo.py
lead to run errors when tested with EC-Earth.