MODULE trc !!====================================================================== !! *** MODULE trc *** !! Passive tracers : module for tracers defined !!====================================================================== !! History : OPA ! 1996-01 (M. Levy) Original code !! - ! 1999-07 (M. Levy) for LOBSTER1 or NPZD model !! - ! 2000-04 (O. Aumont, M.A. Foujols) HAMOCC3 and P3ZD !! NEMO 1.0 ! 2004-03 (C. Ethe) Free form and module !!---------------------------------------------------------------------- #if defined key_top !!---------------------------------------------------------------------- !! 'key_top' TOP models !!---------------------------------------------------------------------- USE par_oce USE par_trc IMPLICIT NONE PUBLIC PUBLIC trc_alloc ! called by nemogcm.F90 !! parameters for the control of passive tracers !! -------------------------------------------------- INTEGER, PUBLIC :: numnat !: the number of the passive tracer NAMELIST !! passive tracers fields (before,now,after) !! -------------------------------------------------- REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: trai !: initial total tracer REAL(wp), PUBLIC :: areatot !: total volume REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,: ) :: cvol !: volume correction -degrad option- REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: trn !: traceur concentration for now time step REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: tra !: traceur concentration for next time step REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: trb !: traceur concentration for before time step !! interpolated gradient !!-------------------------------------------------- REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: gtru !: hor. gradient at u-points at bottom ocean level REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: gtrv !: hor. gradient at v-points at bottom ocean level !! passive tracers (input and output) !! ------------------------------------------ LOGICAL , PUBLIC :: ln_rsttr !: boolean term for restart i/o for passive tracers (namelist) LOGICAL , PUBLIC :: lrst_trc !: logical to control the trc restart write INTEGER , PUBLIC :: nn_dttrc !: frequency of step on passive tracers INTEGER , PUBLIC :: nn_writetrc !: time step frequency for concentration outputs (namelist) INTEGER , PUBLIC :: nutwrs !: output FILE for passive tracers restart INTEGER , PUBLIC :: nutrst !: logical unit for restart FILE for passive tracers INTEGER , PUBLIC :: nn_rsttr !: control of the time step ( 0 or 1 ) for pass. tr. CHARACTER(len = 80) , PUBLIC :: cn_trcrst_in !: suffix of pass. tracer restart name (input) CHARACTER(len = 80) , PUBLIC :: cn_trcrst_out !: suffix of pass. tracer restart name (output) REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: rdttrc !: vertical profile of passive tracer time step LOGICAL , PUBLIC :: ln_trcdta !: Read inputs data from files LOGICAL , PUBLIC :: ln_trcdmp !: internal damping flag !! information for outputs !! -------------------------------------------------- TYPE, PUBLIC :: PTRACER !: Passive tracer type CHARACTER(len = 20) :: clsname !: short name CHARACTER(len = 80) :: cllname !: long name CHARACTER(len = 20) :: clunit !: unit LOGICAL :: llinit !: read in a file or not LOGICAL :: llsave !: save the tracer or not END TYPE PTRACER CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcnm !: tracer name CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcln !: trccer field long name CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcun !: tracer unit LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_ini !: Initialisation from data input file LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_wri !: save the tracer or not TYPE, PUBLIC :: DIAG !: passive trcacer ddditional diagnostic type CHARACTER(len = 20) :: sname !: short name CHARACTER(len = 80) :: lname !: long name CHARACTER(len = 20) :: units !: unit END TYPE DIAG !! additional 2D/3D outputs namelist !! -------------------------------------------------- REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:, :) :: trc2d !: additional 2d outputs array REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: trc3d !: additional 3d outputs array CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrc2d !: 2d field short name CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrc2l !: 2d field long name CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrc2u !: 2d field unit CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrc3d !: 3d field short name CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrc3l !: 3d field long name CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrc3u !: 3d field unit LOGICAL , PUBLIC :: ln_diatrc !: boolean term for additional diagnostic INTEGER , PUBLIC :: nn_writedia !: frequency of additional outputs !! Biological trends !! ----------------- LOGICAL , PUBLIC :: ln_diabio !: boolean term for biological diagnostic INTEGER , PUBLIC :: nn_writebio !: frequency of biological outputs REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: trbio !: biological trends CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrbio !: bio field short name CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrbil !: bio field long name CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrbiu !: bio field unit !!---------------------------------------------------------------------- !! NEMO/TOP 3.3.1 , NEMO Consortium (2010) !! $Id$ !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) !!---------------------------------------------------------------------- CONTAINS INTEGER FUNCTION trc_alloc() !!------------------------------------------------------------------- !! *** ROUTINE trc_alloc *** !!------------------------------------------------------------------- USE lib_mpp, ONLY: ctl_warn !!------------------------------------------------------------------- ! ALLOCATE( trn(jpi,jpj,jpk,jptra), trb(jpi,jpj,jpk,jptra), tra(jpi,jpj,jpk,jptra), & & gtru(jpi,jpj,jpk) , gtrv(jpi,jpj,jpk) , & & cvol(jpi,jpj,jpk) , rdttrc(jpk) , trai(jptra) , & & ctrcnm(jptra) , ctrcln(jptra) , ctrcun(jptra) , & & ln_trc_ini(jptra) , ln_trc_wri(jptra) , STAT = trc_alloc ) IF( trc_alloc /= 0 ) CALL ctl_warn('trc_alloc: failed to allocate arrays') ! END FUNCTION trc_alloc #else !!---------------------------------------------------------------------- !! Empty module : No passive tracer !!---------------------------------------------------------------------- #endif !!====================================================================== END MODULE trc