Changes between Initial Version and Version 1 of Ticket #850


Ignore:
Timestamp:
04/27/20 02:18:49 (4 years ago)
Author:
arango
Comment:

Yes, the SALINITY C-preprocessing option and the metadata for variables associated with salinity is not too restricted nowadys. We rarely use applications without salinity. In the past, it was ommited in highly idealizes toy problem that only have temperature. To avoid errors like the one described in this ticket, we need to add the SALINITY conditional to various routines. We need to put such directives in various section of codes using the isalt index outside of the tracer loop. For example in mod_ncparam.F, we have:

  CASE ('idsurT(itemp)')
  idsurT(itemp)=varid
#ifdef SALINITY
  CASE ('idsurT(isalt)')
  idsurT(isalt)=varid
#endif
  CASE ('idTvar(itemp)')
  idTvar(itemp)=varid
#ifdef SALINITY
  CASE ('idTvar(isalt)')
  idTvar(isalt)=varid
#endif

To make this to work, we need strictly to set the tracer parameter MT in mod_param.F to:

!
! Set the maximum number of tracer between all nested grids.
!
  MT=MAX(NAT,MAXVAL(NT))

instead of MAX(2,MAXVAL(NT)). Recall, that NT(:) = NAT + NBT + NPT + NST


WARNING:

In the end, I have to change around 34 files. Users need to be very strict in the usage of the SALINITY CPP option in the future to avoid compilstion errors.

Many thanks for reporting this problem.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #850

    • Property ResolutionFixed
    • Property Status newclosed
  • Ticket #850 – Description

    initial v1  
    1 I'm having trouble restarting a simulation run with `#undef SALINITY` because the code is unnecessarily checking `LBC_ATT` for salt. The in file is actually consistent so I don't know why its raising an error. But it shouldn't be checking this anyway...
     1I'm having trouble restarting a simulation run with '''#undef SALINITY''' because the code is unnecessarily checking '''LBC_ATT''' for salt. The input file is actually consistent so I don't know why it's raising an error. But it shouldn't be checking this anyway...
    22
    33{{{
     
    2727}}}
    2828
    29 Everything works perfectly with `#define NO_LBC_ATT`
     29Everything works perfectly with '''#define NO_LBC_ATT'''