New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 15699 – NEMO

Changeset 15699


Ignore:
Timestamp:
2022-02-08T11:37:37+01:00 (2 years ago)
Author:
davestorkey
Message:

Fix bug in potential density diagnostic (duplicate iom_put call)
and also add thickness-weighted version.

Location:
NEMO/branches/UKMO/NEMO_4.0.4_GO8_package
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/cfgs/SHARED/field_def_nemo-oce.xml

    r15524 r15699  
    157157        <field id="beta"         long_name="haline contraction"                                                        unit="1e3"    grid_ref="grid_T_3D" /> 
    158158        <field id="rhop"         long_name="potential density (sigma0)"        standard_name="sea_water_sigma_theta"   unit="kg/m3"  grid_ref="grid_T_3D" /> 
     159        <field id="rhop_e3t"     long_name="potential density (sigma0) thickness weighted"        standard_name="sea_water_sigma_theta"   unit="kg/m3"  grid_ref="grid_T_3D"> rhop * e3t </field> 
    159160        <field id="N_2d"         long_name="Depth-mean N"                                                              unit="m/s" /> 
    160161        <field id="modslp"       long_name="sqrt( slpi^2 + slpj^2 )"                                                   unit="1"      grid_ref="grid_T_3D" /> 
  • NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DIA/diaprod.F90

    r14078 r15699  
    6565      ! 
    6666 
    67       IF( iom_use("urhop") .OR. iom_use("vrhop") .OR. iom_use("wrhop") & 
    68 #if ! defined key_diaar5 
    69      &  .OR. iom_use("rhop") & 
    70 #endif 
    71      & ) THEN 
     67      IF( iom_use("urhop") .OR. iom_use("vrhop") .OR. iom_use("wrhop") ) THEN 
    7268         CALL eos( tsn, z3d, zrhop )                 ! now in situ and potential density 
    7369         zrhop(:,:,:) = zrhop(:,:,:)-1000.e0         ! reference potential density to 1000 to avoid precision issues in rhop2 calculation 
    7470         zrhop(:,:,jpk) = 0._wp 
    75 #if ! defined key_diaar5 
    76          CALL iom_put( 'rhop', zrhop ) 
    77 #else 
    78          ! If key_diaar5 set then there is already an iom_put call to output rhop. 
    79          ! Really should be a standard diagnostics option? 
    80 #endif 
    8171      ENDIF 
    8272 
Note: See TracChangeset for help on using the changeset viewer.