- Timestamp:
- 2018-10-29T15:55:40+01:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_AMM15_package/NEMOGCM/NEMO/TOP_SRC/trcdta.F90
r10251 r10253 9 9 !! 3.4 ! 2010-11 (C. Ethe, G. Madec) use of fldread + dynamical allocation 10 10 !! 3.5 ! 2013-08 (M. Vichi) generalization for other BGC models 11 !! 3.6 ! 2015-03 (T. Lovato) revision of code log info 11 12 !!---------------------------------------------------------------------- 12 13 #if defined key_top … … 72 73 IF( nn_timing == 1 ) CALL timing_start('trc_dta_init') 73 74 ! 75 IF( lwp ) THEN 76 WRITE(numout,*) ' ' 77 WRITE(numout,*) ' trc_dta_init : Tracers Initial Conditions (IC)' 78 WRITE(numout,*) ' ~~~~~~~~~~~ ' 79 ENDIF 80 ! 74 81 ! Initialisation 75 82 ierr0 = 0 ; ierr1 = 0 ; ierr2 = 0 ; ierr3 = 0 … … 77 84 ALLOCATE( n_trc_index(ntrc), slf_i(ntrc), STAT=ierr0 ) 78 85 IF( ierr0 > 0 ) THEN 79 CALL ctl_stop( 'trc_ nam: unable to allocate n_trc_index' ) ; RETURN86 CALL ctl_stop( 'trc_dta_init: unable to allocate n_trc_index' ) ; RETURN 80 87 ENDIF 81 88 nb_trcdta = 0 … … 97 104 REWIND( numnat_ref ) ! Namelist namtrc_dta in reference namelist : Passive tracer input data 98 105 READ ( numnat_ref, namtrc_dta, IOSTAT = ios, ERR = 901) 99 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dta in reference namelist', lwp )106 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dta_init in reference namelist', lwp ) 100 107 101 108 REWIND( numnat_cfg ) ! Namelist namtrc_dta in configuration namelist : Passive tracer input data 102 109 READ ( numnat_cfg, namtrc_dta, IOSTAT = ios, ERR = 902 ) 103 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dta in configuration namelist', lwp )110 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dta_init in configuration namelist', lwp ) 104 111 IF(lwm) WRITE ( numont, namtrc_dta ) 105 112 … … 109 116 clndta = TRIM( sn_trcdta(jn)%clvar ) 110 117 clntrc = TRIM( ctrcnm (jn) ) 118 if (jn > jptra) clntrc='Dummy' ! By pass weird formats in ocean.output if ntrc > jptra 111 119 zfact = rn_trfac(jn) 112 120 IF( clndta /= clntrc ) THEN 113 CALL ctl_warn( 'trc_dta_init: passive tracer data initialisation :', &114 & ' the variable name in the data file : '//clndta// &115 & ' must be the same than the name of the passive tracer : '//clntrc//' ')121 CALL ctl_warn( 'trc_dta_init: passive tracer data initialisation ', & 122 & 'Input name of data file : '//TRIM(clndta)// & 123 & ' differs from that of tracer : '//TRIM(clntrc)//' ') 116 124 ENDIF 117 WRITE(numout,*) ' read an initial file for passive tracer number :', jn, ' name : ', clndta, & 118 & ' multiplicative factor : ', zfact 125 WRITE(numout,*) ' ' 126 WRITE(numout,'(a, i3,3a,e11.3)') ' Read IC file for tracer number :', & 127 & jn, ', name : ', TRIM(clndta), ', Multiplicative Scaling factor : ', zfact 119 128 ENDIF 120 129 END DO … … 124 133 ALLOCATE( sf_trcdta(nb_trcdta), rf_trfac(nb_trcdta), STAT=ierr1 ) 125 134 IF( ierr1 > 0 ) THEN 126 CALL ctl_stop( 'trc_dta_ini : unable to allocate sf_trcdta structure' ) ; RETURN135 CALL ctl_stop( 'trc_dta_init: unable to allocate sf_trcdta structure' ) ; RETURN 127 136 ENDIF 128 137 ! … … 135 144 IF( sn_trcdta(jn)%ln_tint ) ALLOCATE( sf_trcdta(jl)%fdta(jpi,jpj,jpk,2) , STAT=ierr3 ) 136 145 IF( ierr2 + ierr3 > 0 ) THEN 137 CALL ctl_stop( 'trc_dta : unable to allocate passive tracer data arrays' ) ; RETURN146 CALL ctl_stop( 'trc_dta_init : unable to allocate passive tracer data arrays' ) ; RETURN 138 147 ENDIF 139 148 ENDIF … … 141 150 ENDDO 142 151 ! ! fill sf_trcdta with slf_i and control print 143 CALL fld_fill( sf_trcdta, slf_i, cn_dir, 'trc_dta ', 'Passive tracer data', 'namtrc' )152 CALL fld_fill( sf_trcdta, slf_i, cn_dir, 'trc_dta_init', 'Passive tracer data', 'namtrc' ) 144 153 ! 145 154 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.