Changeset 7646 for trunk/NEMOGCM/NEMO/TOP_SRC/trc.F90
- Timestamp:
- 2017-02-06T10:25:03+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/TOP_SRC/trc.F90
r6140 r7646 14 14 USE par_oce 15 15 USE par_trc 16 #if defined key_bdy 17 USE bdy_oce, only: nb_bdy, OBC_DATA 18 #endif 16 USE bdy_oce, only: ln_bdy, nb_bdy, OBC_DATA 19 17 20 18 IMPLICIT NONE … … 28 26 INTEGER, PUBLIC :: numnat_cfg = -1 !: logical unit for the reference passive tracer namelist_top_cfg 29 27 INTEGER, PUBLIC :: numont = -1 !: logical unit for the reference passive tracer namelist output output.namelist.top 28 INTEGER, PUBLIC :: numtrc_ref = -1 !: logical unit for the reference passive tracer namelist_top_ref 29 INTEGER, PUBLIC :: numtrc_cfg = -1 !: logical unit for the reference passive tracer namelist_top_cfg 30 INTEGER, PUBLIC :: numonr = -1 !: logical unit for the reference passive tracer namelist output output.namelist.top 30 31 INTEGER, PUBLIC :: numstr !: logical unit for tracer statistics 31 32 INTEGER, PUBLIC :: numrtr !: logical unit for trc restart (read ) … … 68 69 CHARACTER(len = 256), PUBLIC :: cn_trcrst_outdir !: restart output directory 69 70 REAL(wp) , PUBLIC :: rdttrc !: passive tracer time step 70 LOGICAL , PUBLIC :: ln_top_euler !: boolean term for euler integration 71 REAL(wp) , PUBLIC :: r2dttrc !: = 2*rdttrc except at nit000 (=rdttrc) if neuler=0 72 LOGICAL , PUBLIC :: ln_top_euler !: boolean term for euler integration 71 73 LOGICAL , PUBLIC :: ln_trcdta !: Read inputs data from files 72 74 LOGICAL , PUBLIC :: ln_trcdmp !: internal damping flag 73 75 LOGICAL , PUBLIC :: ln_trcdmp_clo !: internal damping flag on closed seas 74 INTEGER , PUBLIC :: nittrc000 76 INTEGER , PUBLIC :: nittrc000 !: first time step of passive tracers model 75 77 LOGICAL , PUBLIC :: l_trcdm2dc !: Diurnal cycle for TOP 76 78 … … 83 85 END TYPE 84 86 85 REAL(wp), DIMENSION(jptra), PUBLIC :: trc_ice_ratio, & ! ice-ocean tracer ratio 86 trc_ice_prescr ! prescribed ice trc cc 87 CHARACTER(len=2), DIMENSION(jptra), PUBLIC :: cn_trc_o ! choice of ocean tracer cc 87 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: trc_ice_ratio ! ice-ocean tracer ratio 88 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: trc_ice_prescr ! prescribed ice trc cc 89 CHARACTER(len=2), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: cn_trc_o ! choice of ocean tracer cc 90 88 91 89 92 !! information for outputs … … 94 97 CHARACTER(len = 20) :: clunit !: unit 95 98 LOGICAL :: llinit !: read in a file or not 96 #if defined key_my_trc97 99 LOGICAL :: llsbc !: read in a file or not 98 100 LOGICAL :: llcbc !: read in a file or not 99 101 LOGICAL :: llobc !: read in a file or not 100 #endif101 LOGICAL :: llsave !: save the tracer or not102 102 END TYPE PTRACER 103 103 104 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcnm !: tracer name 104 105 CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcln !: trccer field long name 105 106 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcun !: tracer unit 106 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_wri !: save the tracer or not107 107 108 108 TYPE, PUBLIC :: DIAG !: passive trcacer ddditional diagnostic type … … 112 112 END TYPE DIAG 113 113 114 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: trc3d !: 3D diagnostics for tracers 115 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: trc2d !: 2D diagnostics for tracers 116 114 117 !! information for inputs 115 118 !! -------------------------------------------------- 116 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_ini !: Initialisation from data input file 117 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_obc !: Use open boundary condition data 118 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_sbc !: Use surface boundary condition data 119 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_cbc !: Use coastal boundary condition data 120 121 !! additional 2D/3D outputs namelist 122 !! -------------------------------------------------- 123 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:, :) :: trc2d !: additional 2d outputs array 124 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: trc3d !: additional 3d outputs array 125 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrc2d !: 2d field short name 126 CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrc2l !: 2d field long name 127 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrc2u !: 2d field unit 128 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrc3d !: 3d field short name 129 CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrc3l !: 3d field long name 130 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrc3u !: 3d field unit 131 LOGICAL , PUBLIC :: ln_diatrc !: boolean term for additional diagnostic 132 INTEGER , PUBLIC :: nn_writedia !: frequency of additional outputs 133 134 !! Biological trends 135 !! ----------------- 136 LOGICAL , PUBLIC :: ln_diabio !: boolean term for biological diagnostic 137 INTEGER , PUBLIC :: nn_writebio !: frequency of biological outputs 138 REAL(wp) , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:,:) :: trbio !: biological trends 139 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrbio !: bio field short name 140 CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrbil !: bio field long name 141 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrbiu !: bio field unit 119 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_ini !: Initialisation from data input file 120 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_obc !: Use open boundary condition data 121 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_sbc !: Use surface boundary condition data 122 LOGICAL , PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ln_trc_cbc !: Use coastal boundary condition data 123 LOGICAL , PUBLIC :: ln_rnf_ctl !: remove runoff dilution on tracers 124 REAL(wp), PUBLIC :: rn_bc_time !: Time scaling factor for SBC and CBC data (seconds in a day) 125 142 126 143 127 !! variables to average over physics over passive tracer sub-steps. … … 189 173 # endif 190 174 ! 191 #if defined key_bdy192 175 CHARACTER(len=20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: cn_trc_dflt ! Default OBC condition for all tracers 193 176 CHARACTER(len=20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: cn_trc ! Choice of boundary condition for tracers … … 195 178 ! External data structure of BDY for TOP. Available elements: cn_obc, ll_trc, trcnow, dmp 196 179 TYPE(OBC_DATA), PUBLIC, ALLOCATABLE, DIMENSION(:,:), TARGET :: trcdta_bdy !: bdy external data (local process) 197 #endif198 180 ! 199 181 … … 211 193 USE lib_mpp, ONLY: ctl_warn 212 194 !!------------------------------------------------------------------- 195 INTEGER :: ierr(4) 196 !!------------------------------------------------------------------- 197 ierr(:) = 0 213 198 ! 214 199 ALLOCATE( trn(jpi,jpj,jpk,jptra), trb(jpi,jpj,jpk,jptra), tra(jpi,jpj,jpk,jptra), & … … 216 201 & gtru (jpi,jpj,jptra) , gtrv (jpi,jpj,jptra) , & 217 202 & gtrui(jpi,jpj,jptra) , gtrvi(jpi,jpj,jptra) , & 203 & trc_ice_ratio(jptra) , trc_ice_prescr(jptra) , cn_trc_o(jptra) , & 218 204 & sbc_trc_b(jpi,jpj,jptra), sbc_trc(jpi,jpj,jptra) , & 219 & cvol(jpi,jpj,jpk) , trai(jptra) , & 220 & ctrcnm(jptra) , ctrcln(jptra) , ctrcun(jptra) , & 221 & ln_trc_ini(jptra) , ln_trc_wri(jptra) , qsr_mean(jpi,jpj) , & 222 #if defined key_my_trc 205 & cvol(jpi,jpj,jpk) , trai(jptra) , qsr_mean(jpi,jpj) , & 206 & ctrcnm(jptra) , ctrcln(jptra) , ctrcun(jptra) , & 207 & ln_trc_ini(jptra) , & 223 208 & ln_trc_sbc(jptra) , ln_trc_cbc(jptra) , ln_trc_obc(jptra) , & 224 #endif 225 #if defined key_bdy 226 & cn_trc_dflt(nb_bdy) , cn_trc(nb_bdy) , nn_trcdmp_bdy(nb_bdy) , & 209 & STAT = ierr(1) ) 210 ! 211 IF ( ln_bdy ) THEN 212 ALLOCATE( cn_trc_dflt(nb_bdy) , cn_trc(nb_bdy) , nn_trcdmp_bdy(nb_bdy) , & 227 213 & trcdta_bdy(jptra,nb_bdy) , & 228 #endif 229 & STAT = trc_alloc ) 230 214 & STAT = ierr(2) ) 215 ENDIF 216 ! 217 IF (jp_dia3d > 0 ) ALLOCATE( trc3d(jpi,jpj,jpk,jp_dia3d), STAT = ierr(3) ) 218 ! 219 IF (jp_dia2d > 0 ) ALLOCATE( trc2d(jpi,jpj,jpk,jp_dia2d), STAT = ierr(4) ) 220 ! 221 trc_alloc = MAXVAL( ierr ) 231 222 IF( trc_alloc /= 0 ) CALL ctl_warn('trc_alloc: failed to allocate arrays') 232 223 !
Note: See TracChangeset
for help on using the changeset viewer.