Changeset 7097
- Timestamp:
- 2016-10-25T17:32:50+02:00 (8 years ago)
- Location:
- branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/CONFIG/SHARED/namelist_top_ref
r7068 r7097 26 26 &namtrc ! tracers definition 27 27 !----------------------------------------------------------------------- 28 jptra = 1! Number of passive tracers of the BGC model28 jptra = 0 ! Number of passive tracers of the BGC model 29 29 ! 30 30 ln_pisces = .false. ! Run PISCES BGC model 31 ln_age = . true.! Run the sea water age tracer32 ln_cfc11 = . true.! Run the CFC11 passive tracer31 ln_age = .false. ! Run the sea water age tracer 32 ln_cfc11 = .false. ! Run the CFC11 passive tracer 33 33 ln_cfc12 = .false. ! Run the CFC12 passive tracer 34 ln_c14 = . true.! Run the Radiocarbon passive tracer34 ln_c14 = .false. ! Run the Radiocarbon passive tracer 35 35 ln_my_trc = .false. ! Run MY_TRC BGC model 36 36 ! … … 40 40 ! ! ! ! ! ! 41 41 ! ! name ! title of the field ! units ! initial data from file or not ! 42 42 ! sn_tracer(1) = 'tracer ' , 'Tracer Concentration ', ' - ' , .false. 43 43 / 44 44 !----------------------------------------------------------------------- -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcini_age.F90
r7068 r7097 10 10 USE oce_trc 11 11 USE trc 12 USE trcnam_age ! AGE SMS namelist 12 13 USE trcsms_age 13 14 … … 39 40 IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 40 41 42 CALL trc_nam_age 43 41 44 rryear = 1._wp / ( nyear_len(1) * rday ) ! recip number of seconds in one year 42 45 -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/AGE/trcnam_age.F90
r7068 r7097 9 9 !!---------------------------------------------------------------------- 10 10 USE oce_trc ! Ocean variables 11 USE trc ! Ocean variables11 USE trc ! Ocean variables 12 12 USE trcsms_age ! AGE specific variable 13 13 -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/C14/trcini_c14.F90
r7068 r7097 45 45 !!---------------------------------------------------------------------- 46 46 ! 47 CALL trc_nam_c14 47 48 ! ! Allocate c14 arrays 48 49 IF( sms_c14_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'trc_ini_c14: unable to allocate C14 arrays' ) -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/CFC/trcini_cfc.F90
r7068 r7097 12 12 USE par_trc ! TOP parameters 13 13 USE trc ! TOP variables 14 USE trcnam_cfc ! CFC SMS namelist 14 15 USE trcsms_cfc ! CFC sms trends 15 16 … … 49 50 IF(lwp) WRITE(numout,*) ' trc_ini_cfc: initialisation of CFC chemical model' 50 51 IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~' 51 52 ! 53 CALL trc_nam_cfc 54 ! 52 55 IF(lwp) WRITE(numout,*) 'read of formatted file cfc1112atm' 53 56 -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/MY_TRC/par_my_trc.F90
r7073 r7097 16 16 INTEGER, PUBLIC :: jp_myt0 !: First index of MY_TRC passive tracers 17 17 INTEGER, PUBLIC :: jp_myt1 !: Last index of MY_TRC passive tracers 18 19 INTEGER, PUBLIC :: jpmyt0, jpmty1, jpmyt2 !: index of MY_TRC passive tracers20 18 !!====================================================================== 21 19 END MODULE par_my_trc -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcice_my_trc.F90
r7073 r7097 3 3 !! *** MODULE trcice_my_trc *** 4 4 !!---------------------------------------------------------------------- 5 !! trc_ice_my_trc : MY_TRC model main routine 5 !! trc_ice_my_trc : MY_TRC model seaice coupling routine 6 !!---------------------------------------------------------------------- 7 !! History : ! 2016 (C. Ethe, T. Lovato) Revised architecture 6 8 !!---------------------------------------------------------------------- 7 9 USE par_trc ! TOP parameters … … 15 17 16 18 !!---------------------------------------------------------------------- 17 !! NEMO/TOP 3.3 , NEMO Consortium (2010)18 !! $Id : trcice_my_trc.F90 4990 2014-12-15 16:42:49Z timgraham$19 !! NEMO/TOP 4.0 , NEMO Consortium (2016) 20 !! $Id$ 19 21 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 20 22 !!---------------------------------------------------------------------- … … 30 32 END SUBROUTINE trc_ice_ini_my_trc 31 33 32 33 34 !!====================================================================== 34 35 END MODULE trcice_my_trc -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcini_my_trc.F90
r7073 r7097 4 4 !! TOP : initialisation of the MY_TRC tracers 5 5 !!====================================================================== 6 !! History : 2.0 ! 2007-12 (C. Ethe, G. Madec) Original code 6 !! History : ! 2007 (C. Ethe, G. Madec) Original code 7 !! ! 2016 (C. Ethe, T. Lovato) Revised architecture 7 8 !!---------------------------------------------------------------------- 8 9 !! trc_ini_my_trc : MY_TRC model initialisation … … 11 12 USE oce_trc 12 13 USE trc 14 USE par_my_trc 15 USE trcnam_my_trc ! MY_TRC SMS namelist 13 16 USE trcsms_my_trc 14 17 … … 19 22 20 23 !!---------------------------------------------------------------------- 21 !! NEMO/TOP 3.3 , NEMO Consortium (2010)24 !! NEMO/TOP 4.0 , NEMO Consortium (2016) 22 25 !! $Id$ 23 26 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 33 36 !! ** Method : - Read the namcfc namelist and check the parameter values 34 37 !!---------------------------------------------------------------------- 35 38 ! 39 CALL trc_nam_my_trc 40 ! 36 41 ! ! Allocate MY_TRC arrays 37 42 IF( trc_sms_my_trc_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'trc_ini_my_trc: unable to allocate MY_TRC arrays' ) … … 49 54 END SUBROUTINE trc_ini_my_trc 50 55 51 52 56 !!====================================================================== 53 57 END MODULE trcini_my_trc -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcnam_my_trc.F90
r7073 r7097 4 4 !! TOP : initialisation of some run parameters for MY_TRC bio-model 5 5 !!====================================================================== 6 !! History : 2.0 ! 2007-12 (C. Ethe, G. Madec) Original code 6 !! History : ! 2007 (C. Ethe, G. Madec) Original code 7 !! ! 2016 (C. Ethe, T. Lovato) Revised architecture 7 8 !!---------------------------------------------------------------------- 8 9 !! trc_nam_my_trc : MY_TRC model initialisation … … 18 19 19 20 !!---------------------------------------------------------------------- 20 !! NEMO/TOP 3.3 , NEMO Consortium (2010)21 !! NEMO/TOP 4.0 , NEMO Consortium (2016) 21 22 !! $Id$ 22 23 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 39 40 END SUBROUTINE trc_nam_my_trc 40 41 41 42 42 !!====================================================================== 43 43 END MODULE trcnam_my_trc -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcsms_my_trc.F90
r7073 r7097 4 4 !! TOP : Main module of the MY_TRC tracers 5 5 !!====================================================================== 6 !! History : 2.0 ! 2007-12 (C. Ethe, G. Madec) Original code 6 !! History : ! 2007 (C. Ethe, G. Madec) Original code 7 !! ! 2016 (C. Ethe, T. Lovato) Revised architecture 7 8 !!---------------------------------------------------------------------- 8 9 !! trc_sms_my_trc : MY_TRC model main routine … … 25 26 26 27 !!---------------------------------------------------------------------- 27 !! NEMO/TOP 3.3 , NEMO Consortium (2010)28 !! NEMO/TOP 4.0 , NEMO Consortium (2016) 28 29 !! $Id$ 29 30 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) … … 70 71 END SUBROUTINE trc_sms_my_trc 71 72 72 73 73 INTEGER FUNCTION trc_sms_my_trc_alloc() 74 74 !!---------------------------------------------------------------------- … … 84 84 END FUNCTION trc_sms_my_trc_alloc 85 85 86 87 86 !!====================================================================== 88 87 END MODULE trcsms_my_trc -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/MY_TRC/trcwri_my_trc.F90
r7073 r7097 2 2 !!====================================================================== 3 3 !! *** MODULE trcwri *** 4 !! my_trc : Output of my_trc tracers4 !! trc_wri_my_trc : outputs of concentration fields 5 5 !!====================================================================== 6 !! History : 1.0 ! 2009-05 (C. Ethe) Original code7 !!----------------------------------------------------------------------8 6 #if defined key_top && defined key_iomput 9 7 !!---------------------------------------------------------------------- 10 !! trc_wri_my_trc : outputs of concentration fields 8 !! History : ! 2007 (C. Ethe, G. Madec) Original code 9 !! ! 2016 (C. Ethe, T. Lovato) Revised architecture 11 10 !!---------------------------------------------------------------------- 12 USE par_trc ! passive tracers common variables 11 USE par_trc ! passive tracers common variables 13 12 USE trc ! passive tracers common variables 14 13 USE iom ! I/O manager … … 19 18 PUBLIC trc_wri_my_trc 20 19 20 !!---------------------------------------------------------------------- 21 !! NEMO/TOP 4.0 , NEMO Consortium (2016) 22 !! $Id$ 23 !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 24 !!---------------------------------------------------------------------- 21 25 CONTAINS 22 26 -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90
r7068 r7097 13 13 !! trc_ini_pisces : PISCES biochemical model initialisation 14 14 !!---------------------------------------------------------------------- 15 USE par_trc ! TOP parameters15 USE par_trc ! TOP parameters 16 16 USE oce_trc ! shared variables between ocean and passive tracers 17 17 USE trc ! passive tracers common variables 18 USE trcnam_pisces ! PISCES namelist 18 19 USE sms_pisces ! PISCES Source Minus Sink variables 19 20 … … 84 85 IF(lwp) WRITE(numout,*) ' p4z_ini : PISCES biochemical model initialisation' 85 86 IF(lwp) WRITE(numout,*) ' ~~~~~~~~~~~~~~' 86 87 ! Allocate PISCES arrays 87 ! 88 CALL trc_nam_pisces 89 ! 90 ! Allocate PISCES arrays 88 91 ierr = sms_pisces_alloc() 89 92 ierr = ierr + p4z_che_alloc() -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trc.F90
r7068 r7097 103 103 END TYPE PTRACER 104 104 105 TYPE, PUBLIC :: STRACER !: Passive tracer type106 LOGICAL :: llsbc !: read in a file or not107 LOGICAL :: llcbc !: read in a file or not108 LOGICAL :: llobc !: read in a file or not109 END TYPE STRACER110 111 105 CHARACTER(len = 20), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcnm !: tracer name 112 106 CHARACTER(len = 80), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:) :: ctrcln !: trccer field long name … … 202 196 & gtru (jpi,jpj,jptra) , gtrv (jpi,jpj,jptra) , & 203 197 & gtrui(jpi,jpj,jptra) , gtrvi(jpi,jpj,jptra) , & 198 & trc_ice_ratio(jptra) , trc_ice_prescr(jptra) , cn_trc_o(jptra) , & 204 199 & sbc_trc_b(jpi,jpj,jptra), sbc_trc(jpi,jpj,jptra) , & 205 & cvol(jpi,jpj,jpk) , trai(jptra) , qsr_mean(jpi,jpj) , & 200 & cvol(jpi,jpj,jpk) , trai(jptra) , qsr_mean(jpi,jpj) , & 201 & ctrcnm(jptra) , ctrcln(jptra) , ctrcun(jptra) , & 202 & ln_trc_ini(jptra) , & 203 & ln_trc_sbc(jptra) , ln_trc_cbc(jptra) , ln_trc_obc(jptra) , & 204 #if defined key_bdy 205 & cn_trc_dflt(nb_bdy) , cn_trc(nb_bdy) , nn_trcdmp_bdy(nb_bdy) , & 206 & trcdta_bdy(jptra,nb_bdy) , & 207 #endif 206 208 & STAT = trc_alloc ) 207 209 -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcice.F90
r7068 r7097 46 46 47 47 IF( nn_timing == 1 ) CALL timing_start('trc_ice_ini') 48 48 ! 49 CALL trc_nam_ice 49 50 ! 50 51 trc_i(:,:,:) = 0.0d0 ! by default … … 63 64 END SUBROUTINE trc_ice_ini 64 65 66 SUBROUTINE trc_nam_ice 67 !!--------------------------------------------------------------------- 68 !! *** ROUTINE trc_nam_ice *** 69 !! 70 !! ** Purpose : Read the namelist for the ice effect on tracers 71 !! 72 !! ** Method : - 73 !! 74 !!--------------------------------------------------------------------- 75 INTEGER :: jn ! dummy loop indices 76 INTEGER :: ios, ierr ! Local integer output status for namelist read 77 ! 78 TYPE(TRC_I_NML), DIMENSION(jpmaxtrc) :: sn_tri_tracer 79 !! 80 NAMELIST/namtrc_ice/ nn_ice_tr, sn_tri_tracer 81 !!--------------------------------------------------------------------- 82 ! 83 IF(lwp) THEN 84 WRITE(numout,*) 85 WRITE(numout,*) 'trc_nam_ice : Read the namelist for trc_ice' 86 WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' 87 ENDIF 88 89 IF( nn_timing == 1 ) CALL timing_start('trc_nam_ice') 90 91 ! 92 REWIND( numnat_ref ) ! Namelist namtrc_ice in reference namelist : Passive tracer input data 93 READ ( numnat_ref, namtrc_ice, IOSTAT = ios, ERR = 901) 94 901 IF( ios /= 0 ) CALL ctl_nam ( ios , ' namtrc_ice in reference namelist ', lwp ) 95 96 REWIND( numnat_cfg ) ! Namelist namtrc_ice in configuration namelist : Pisces external sources of nutrients 97 READ ( numnat_cfg, namtrc_ice, IOSTAT = ios, ERR = 902 ) 98 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ice in configuration namelist', lwp ) 99 100 IF( lwp ) THEN 101 WRITE(numout,*) ' ' 102 WRITE(numout,*) ' Sea ice tracers option (nn_ice_tr) : ', nn_ice_tr 103 WRITE(numout,*) ' ' 104 ENDIF 105 ! 106 ! Assign namelist stuff 107 DO jn = 1, jptra 108 trc_ice_ratio (jn) = sn_tri_tracer(jn)%trc_ratio 109 trc_ice_prescr(jn) = sn_tri_tracer(jn)%trc_prescr 110 cn_trc_o (jn) = sn_tri_tracer(jn)%ctrc_o 111 END DO 112 113 IF( nn_timing == 1 ) CALL timing_stop('trc_nam_ice') 114 ! 115 END SUBROUTINE trc_nam_ice 116 65 117 #else 66 118 !!---------------------------------------------------------------------- … … 70 122 SUBROUTINE trc_ice_ini ! Dummy routine 71 123 END SUBROUTINE trc_ice_ini 124 125 SUBROUTINE trc_nam_ice 126 END SUBROUTINE trc_nam_ice 127 72 128 #endif 73 129 -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcini.F90
r7068 r7097 58 58 IF(lwp) WRITE(numout,*) 'trc_init : initial set up of the passive tracers' 59 59 IF(lwp) WRITE(numout,*) '~~~~~~~' 60 61 !62 60 ! 63 61 CALL trc_ini_ctl ! control … … 78 76 CALL trc_ini_state ! passive tracers initialisation : from a restart or from clim 79 77 IF( nn_dttrc /= 1 ) & 80 CALL trc_sub_ini 81 CALL trc_ini_inv ! Inventories78 CALL trc_sub_ini ! Initialize variables for substepping passive tracers 79 CALL trc_ini_inv ! Inventories 82 80 ! 83 81 IF( nn_timing == 1 ) CALL timing_stop('trc_init') … … 156 154 USE trcini_age ! age initialisation 157 155 USE trcini_my_trc ! MY_TRC initialisation 158 !!---------------------------------------------------------------------- 156 ! 157 INTEGER :: jn 158 !!---------------------------------------------------------------------- 159 ! 160 ! Pass sn_tracer fields to specialized arrays 161 DO jn = 1, jp_bgc 162 ctrcnm (jn) = TRIM( sn_tracer(jn)%clsname ) 163 ctrcln (jn) = TRIM( sn_tracer(jn)%cllname ) 164 ctrcun (jn) = TRIM( sn_tracer(jn)%clunit ) 165 ln_trc_ini(jn) = sn_tracer(jn)%llinit 166 ln_trc_sbc(jn) = sn_tracer(jn)%llsbc 167 ln_trc_cbc(jn) = sn_tracer(jn)%llcbc 168 ln_trc_obc(jn) = sn_tracer(jn)%llobc 169 END DO 159 170 ! 160 171 IF( ln_pisces ) CALL trc_ini_pisces ! PISCES model … … 163 174 IF( ln_c14 ) CALL trc_ini_c14 ! C14 model 164 175 IF( ln_age ) CALL trc_ini_age ! AGE 176 ! 177 IF(lwp) THEN ! control print 178 WRITE(numout,*) 'ID NAME INI SBC CBC OBC' 179 DO jn = 1, jptra 180 WRITE(numout,9001) jn, TRIM(ctrcnm(jn)), ln_trc_ini(jn), ln_trc_sbc(jn),ln_trc_cbc(jn),ln_trc_obc(jn) 181 END DO 182 WRITE(numout,*) ' ' 183 ENDIF 184 9001 FORMAT(i3,1x,a10,3x,l2,3x,l2,3x,l2,3x,l2) 165 185 ! 166 186 END SUBROUTINE trc_ini_sms -
branches/2016/dev_r7012_ROBUST5_CNRS/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
r7068 r7097 35 35 PUBLIC trc_nam ! called in trcini 36 36 37 TYPE(PTRACER), DIMENSION(jpmaxtrc), PUBLIC :: sn_tracer ! type of tracer for saving if not key_iomput 38 37 39 !!---------------------------------------------------------------------- 38 40 !! NEMO/TOP 3.3 , NEMO Consortium (2010) … … 58 60 CALL trc_nam_trc ! passive tracer informations 59 61 ! 60 !61 62 IF( ln_rsttr ) ln_trcdta = .FALSE. ! restart : no need of clim data 62 63 ! … … 82 83 ENDIF 83 84 ENDIF 84 85 86 rdttrc = rdt * FLOAT( nn_dttrc ) ! passive tracer time-step 87 88 IF(lwp) THEN ! control print 85 ! 86 rdttrc = rdt * FLOAT( nn_dttrc ) ! passive tracer time-step 87 ! 88 IF(lwp) THEN ! control print 89 89 WRITE(numout,*) 90 90 WRITE(numout,*) ' Passive Tracer time step rdttrc = ', rdttrc 91 91 WRITE(numout,*) 92 92 ENDIF 93 94 93 ! 95 94 IF( l_trdtrc ) CALL trc_nam_trd ! Passive tracer trends 96 97 98 CALL trc_nam_ice ! ice module for tracerd99 100 ! namelist of SMS101 ! ---------------102 IF( ln_age ) THEN ; CALL trc_nam_age ! AGE tracer103 ELSE ; IF(lwp) WRITE(numout,*) ' AGE not used'104 ENDIF105 106 IF( ll_cfc ) THEN ; CALL trc_nam_cfc ! CFC tracers107 ELSE ; IF(lwp) WRITE(numout,*) ' CFC not used'108 ENDIF109 110 IF( ln_c14 ) THEN ; CALL trc_nam_c14 ! C14 tracers111 ELSE ; IF(lwp) WRITE(numout,*) ' C14 not used'112 ENDIF113 114 IF( ln_pisces ) THEN ; CALL trc_nam_pisces ! PISCES bio-model115 ELSE ; IF(lwp) WRITE(numout,*) ' PISCES not used'116 ENDIF117 118 119 IF( ln_my_trc ) THEN ; CALL trc_nam_my_trc ! MY_TRC tracers120 ELSE ; IF(lwp) WRITE(numout,*) ' MY_TRC not used'121 ENDIF122 95 ! 123 96 END SUBROUTINE trc_nam … … 176 149 !! 177 150 !!--------------------------------------------------------------------- 178 INTEGER :: ios, ierr, ioptio, icfc ! Local integer output status for namelist read 179 INTEGER :: jn ! dummy loop indice 180 ! 181 TYPE(PTRACER), DIMENSION(jpmaxtrc) :: sn_tracer ! type of tracer for saving if not key_iomput 182 TYPE(STRACER), DIMENSION(jpmaxtrc) :: bc_tracer ! type of tracer for saving if not key_iomput 151 INTEGER :: ios, ierr, icfc ! Local integer output status for namelist read 183 152 !! 184 153 NAMELIST/namtrc/jptra, ln_pisces, ln_my_trc, ln_age, ln_cfc11, ln_cfc12, ln_c14, & 185 154 & sn_tracer, ln_trcdta, ln_trcdmp, ln_trcdmp_clo 186 155 !!--------------------------------------------------------------------- 156 ! Dummy settings to fill tracers data structure 157 ! ! name ! title ! unit ! init ! sbc ! cbc ! obc ! 158 sn_tracer = PTRACER( 'NONAME' , 'NOTITLE' , 'NOUNIT' , .false. , .false. , .false. , .false.) 159 ! 187 160 IF(lwp) WRITE(numout,*) 188 161 IF(lwp) WRITE(numout,*) 'trc_nam_trc : read the passive tracer namelists' 189 162 IF(lwp) WRITE(numout,*) '~~~~~~~' 190 191 163 192 164 REWIND( numnat_ref ) ! Namelist namtrc in reference namelist : Passive tracer variables … … 199 171 IF(lwm) WRITE ( numont, namtrc ) 200 172 201 ioptio = 0 202 IF( ln_pisces ) ioptio = ioptio + 1 203 IF( ln_my_trc ) ioptio = ioptio + 1 204 ! 205 IF( ioptio == 2 ) CALL ctl_stop( 'Choose only ONE BGC model - PISCES or MY_TRC' ) 206 IF( ioptio == 0 ) jptra = 0 207 173 ! Control settings 174 IF( ln_pisces .AND. ln_my_trc ) CALL ctl_stop( 'Choose only ONE BGC model - PISCES or MY_TRC' ) 175 IF( .NOT. ln_pisces .AND. .NOT. ln_my_trc ) jptra = 0 208 176 ll_cfc = ln_cfc11 .OR. ln_cfc12 209 210 177 ! 211 178 jp_pisces = 0 ; jp_pcs0 = 0 ; jp_pcs1 = 0 … … 213 180 jp_cfc = 0 ; jp_cfc0 = 0 ; jp_cfc1 = 0 214 181 jp_age = 0 ; jp_c14 = 0 182 ! 215 183 IF( ln_pisces ) THEN 216 184 jp_pisces = jptra … … 241 209 jp_c14 = jptra 242 210 ENDIF 243 211 ! 212 IF( jptra == 0 ) CALL ctl_stop( 'All TOP tracers disabled: change namtrc setting or check if key_top is active' ) 213 ! 244 214 IF(lwp) THEN ! control print 245 215 WRITE(numout,*) … … 247 217 WRITE(numout,*) ' Total number of passive tracers jptra = ', jptra 248 218 WRITE(numout,*) ' Simulating PISCES model ln_pisces = ', ln_pisces 219 WRITE(numout,*) ' Simulating MY_TRC model ln_my_trc = ', ln_my_trc 249 220 WRITE(numout,*) ' Simulating water mass age ln_age = ', ln_age 250 221 WRITE(numout,*) ' Simulating CFC11 passive tracer ln_cfc11 = ', ln_cfc11 251 222 WRITE(numout,*) ' Simulating CFC12 passive tracer ln_cfc12 = ', ln_cfc12 252 223 WRITE(numout,*) ' Simulating C14 passive tracer ln_c14 = ', ln_c14 253 WRITE(numout,*) ' Simulating MY_TRC model ln_my_trc = ', ln_my_trc254 224 WRITE(numout,*) ' Read inputs data from file (y/n) ln_trcdta = ', ln_trcdta 255 225 WRITE(numout,*) ' Damping of passive tracer (y/n) ln_trcdmp = ', ln_trcdmp 256 226 WRITE(numout,*) ' Restoring of tracer on closed seas ln_trcdmp_clo = ', ln_trcdmp_clo 227 WRITE(numout,*) ' Total number of BGC-like tracers jp_bgc = ', jp_bgc 257 228 WRITE(numout,*) ' ' 258 229 WRITE(numout,*) ' ' 259 230 ENDIF 260 231 ! 261 ALLOCATE( ctrcnm(jptra) , ctrcln(jptra) , ctrcun(jptra) , ln_trc_ini(jptra), &262 #if defined key_bdy263 & cn_trc_dflt(nb_bdy), cn_trc(nb_bdy), nn_trcdmp_bdy(nb_bdy), trcdta_bdy(jptra,nb_bdy), &264 #endif265 & ln_trc_sbc(jptra), ln_trc_cbc(jptra), ln_trc_obc(jptra), STAT = ierr )266 !267 232 IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'trc_nam_ice: unable to allocate arrays' ) 268 !269 DO jn = 1, jp_bgc270 ctrcnm (jn) = TRIM( sn_tracer(jn)%clsname )271 ctrcln (jn) = TRIM( sn_tracer(jn)%cllname )272 ctrcun (jn) = TRIM( sn_tracer(jn)%clunit )273 ln_trc_ini(jn) = sn_tracer(jn)%llinit274 END DO275 !276 IF( ln_my_trc ) THEN277 DO jn = 1, jp_bgc278 ln_trc_sbc(jn) = bc_tracer(jn)%llsbc279 ln_trc_cbc(jn) = bc_tracer(jn)%llcbc280 ln_trc_obc(jn) = bc_tracer(jn)%llobc281 END DO282 ENDIF283 !284 IF(lwp) THEN ! control print285 DO jn = 1, jp_bgc286 WRITE(numout,*) ' tracer nb : ', jn, ' short name : ', ctrcnm(jn)287 END DO288 WRITE(numout,*) ' '289 ENDIF290 !291 233 ! 292 234 IF( ln_age .OR. ll_cfc .OR. ln_c14 ) THEN … … 299 241 300 242 END SUBROUTINE trc_nam_trc 301 302 303 SUBROUTINE trc_nam_ice304 !!---------------------------------------------------------------------305 !! *** ROUTINE trc_nam_ice ***306 !!307 !! ** Purpose : Read the namelist for the ice effect on tracers308 !!309 !! ** Method : -310 !!311 !!---------------------------------------------------------------------312 INTEGER :: jn ! dummy loop indices313 INTEGER :: ios, ierr ! Local integer output status for namelist read314 !315 TYPE(TRC_I_NML), DIMENSION(jpmaxtrc) :: sn_tri_tracer ! type of tracer for saving if not key_iomput316 !!317 NAMELIST/namtrc_ice/ nn_ice_tr, sn_tri_tracer318 !!---------------------------------------------------------------------319 !320 IF(lwp) THEN321 WRITE(numout,*)322 WRITE(numout,*) 'trc_nam_ice : Read the namelist for trc_ice'323 WRITE(numout,*) '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'324 ENDIF325 326 IF( nn_timing == 1 ) CALL timing_start('trc_nam_ice')327 328 !329 REWIND( numnat_ref ) ! Namelist namtrc_ice in reference namelist : Passive tracer input data330 READ ( numnat_ref, namtrc_ice, IOSTAT = ios, ERR = 901)331 901 IF( ios /= 0 ) CALL ctl_nam ( ios , ' namtrc_ice in reference namelist ', lwp )332 333 REWIND( numnat_cfg ) ! Namelist namtrc_ice in configuration namelist : Pisces external sources of nutrients334 READ ( numnat_cfg, namtrc_ice, IOSTAT = ios, ERR = 902 )335 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ice in configuration namelist', lwp )336 337 IF( lwp ) THEN338 WRITE(numout,*) ' '339 WRITE(numout,*) ' Sea ice tracers option (nn_ice_tr) : ', nn_ice_tr340 WRITE(numout,*) ' '341 ENDIF342 343 ALLOCATE( trc_ice_ratio(jptra), trc_ice_prescr(jptra), cn_trc_o(jptra), STAT = ierr )344 IF( ierr /= 0 ) CALL ctl_stop( 'STOP', 'trc_nam_ice: unable to allocate arrays' )345 !346 ! Assign namelist stuff347 DO jn = 1, jptra348 trc_ice_ratio (jn) = sn_tri_tracer(jn)%trc_ratio349 trc_ice_prescr(jn) = sn_tri_tracer(jn)%trc_prescr350 cn_trc_o (jn) = sn_tri_tracer(jn)%ctrc_o351 END DO352 353 IF( nn_timing == 1 ) CALL timing_stop('trc_nam_ice')354 !355 END SUBROUTINE trc_nam_ice356 357 358 243 359 244 SUBROUTINE trc_nam_trd
Note: See TracChangeset
for help on using the changeset viewer.