- Timestamp:
- 2010-04-30T17:49:04+02:00 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DEV_r1837_mass_heat_salt_fluxes/NEMO/LIM_SRC_2/limwri_2.F90
r1818 r1855 12 12 !! 'key_lim2' LIM 2.0 sea-ice model 13 13 !!---------------------------------------------------------------------- 14 !!---------------------------------------------------------------------- 15 !! lim_wri_2 : write of the diagnostics variables in ouput file 16 !! lim_wri_init_2 : initialization and namelist read 17 !! lim_wri_state_2 : write for initial state or/and abandon: 18 !! > output.init.nc (if ninist = 1 in namelist) 19 !! > output.abort.nc 14 !! lim_wri_2 : write of the diagnostics variables in ouput file 15 !! lim_wri_init_2 : initialization and namelist read 16 !! lim_wri_state_2 : write for initial state (output.init.nc if ninist=1) or/and in the abort file 20 17 !!---------------------------------------------------------------------- 21 18 USE phycst … … 42 39 INTEGER, PARAMETER :: jpnoumax = 40 ! maximum number of variable for ice output 43 40 INTEGER :: noumef ! number of fields 44 REAL(wp) , DIMENSION(jpnoumax) :: cmulti , &! multiplicative constant45 &cadd ! additive constant41 REAL(wp) , DIMENSION(jpnoumax) :: cmulti ! multiplicative constant 42 REAL(wp) , DIMENSION(jpnoumax) :: cadd ! additive constant 46 43 CHARACTER(len = 35), DIMENSION(jpnoumax) :: titn ! title of the field 47 44 CHARACTER(len = 8 ), DIMENSION(jpnoumax) :: nam ! name of the field … … 52 49 INTEGER , DIMENSION( jpij ) :: ndex51 ! ???? 53 50 54 REAL(wp) :: & ! constant values 55 epsi16 = 1.e-16 , & 56 zzero = 0.e0 , & 57 zone = 1.e0 51 REAL(wp) :: epsi16 = 1.e-16 ! constant values 52 REAL(wp) :: rzero = 0.e0 ! 53 REAL(wp) :: rone = 1.e0 ! 58 54 59 55 !! * Substitutions 60 56 # include "vectopt_loop_substitute.h90" 61 57 !!---------------------------------------------------------------------- 62 !! LIM 2.0, UCL-LOCEAN-IPSL (2006)58 !! NEMO/LIM 3.3, UCL-LOCEAN-IPSL (2010) 63 59 !! $Id$ 64 60 !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) … … 81 77 !! 82 78 !! ** Method : computes the average of some variables and write 83 !! it in the NetCDF ouput files 84 !! CAUTION: the sea-ice time-step must be an integer fraction 85 !! of a day 79 !! it in the NetCDF ouput files 80 !! CAUTION: the sea-ice time-step must be an integer fraction of a day 86 81 !!------------------------------------------------------------------- 87 82 INTEGER, INTENT(in) :: kt ! number of iteration 88 83 !! 89 INTEGER :: ji, jj, jf 84 INTEGER :: ji, jj, jf ! dummy loop indices 90 85 CHARACTER(len = 40) :: clhstnam, clop 91 REAL(wp) :: zsto, zjulian, zout , &! temporary scalars92 &zindh, zinda, zindb, ztmu86 REAL(wp) :: zsto, zjulian, zout ! temporary scalars 87 REAL(wp) :: zindh, zinda, zindb, ztmu 93 88 REAL(wp), DIMENSION(1) :: zdept 94 89 REAL(wp), DIMENSION(jpi,jpj) :: zfield … … 132 127 DO jj = 2 , jpjm1 133 128 DO ji = 1 , jpim1 ! NO vector opt. 134 zindh = MAX( zzero , SIGN( zone , hicif(ji,jj) * (1.0 - frld(ji,jj) ) - 0.10 ) )135 zinda = MAX( zzero , SIGN( zone , ( 1.0 - frld(ji,jj) ) - 0.10 ) )129 zindh = MAX( rzero , SIGN( rone , hicif(ji,jj) * (1.0 - frld(ji,jj) ) - 0.10 ) ) 130 zinda = MAX( rzero , SIGN( rone , ( 1.0 - frld(ji,jj) ) - 0.10 ) ) 136 131 zindb = zindh * zinda 137 ztmu = MAX( 0.5 * zone , ( tmu(ji,jj) + tmu(ji+1,jj) + tmu(ji,jj+1) + tmu(ji+1,jj+1) ) )132 ztmu = MAX( 0.5 * rone , ( tmu(ji,jj) + tmu(ji+1,jj) + tmu(ji,jj+1) + tmu(ji+1,jj+1) ) ) 138 133 zcmo(ji,jj,1) = hsnif (ji,jj) 139 134 zcmo(ji,jj,2) = hicif (ji,jj) … … 143 138 zcmo(ji,jj,6) = fbif (ji,jj) 144 139 zcmo(ji,jj,7) = zindb * ( u_ice(ji,jj ) * tmu(ji,jj ) + u_ice(ji+1,jj ) * tmu(ji+1,jj ) & 145 146 140 & + u_ice(ji,jj+1) * tmu(ji,jj+1) + u_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 141 & / ztmu 147 142 148 143 zcmo(ji,jj,8) = zindb * ( v_ice(ji,jj ) * tmu(ji,jj ) + v_ice(ji+1,jj ) * tmu(ji+1,jj ) & 149 150 144 & + v_ice(ji,jj+1) * tmu(ji,jj+1) + v_ice(ji+1,jj+1) * tmu(ji+1,jj+1) ) & 145 & / ztmu 151 146 zcmo(ji,jj,9) = sst_m(ji,jj) 152 147 zcmo(ji,jj,10) = sss_m(ji,jj) … … 200 195 !! ** input : Namelist namicewri 201 196 !!------------------------------------------------------------------- 202 INTEGER :: nf ! ???197 INTEGER :: jf ! dummy loop indices 203 198 TYPE FIELD 204 199 CHARACTER(len = 35) :: ztitle … … 209 204 REAL :: zcadd 210 205 END TYPE FIELD 211 TYPE(FIELD) :: & 212 field_1 , field_2 , field_3 , field_4 , field_5 , field_6 , & 213 field_7 , field_8 , field_9 , field_10, field_11, field_12, & 214 field_13, field_14, field_15, field_16, field_17, field_18, & 215 field_19 206 TYPE(FIELD) :: field_1 , field_2 , field_3 , field_4 , field_5 , field_6 207 TYPE(FIELD) :: field_7 , field_8 , field_9 , field_10, field_11, field_12 208 TYPE(FIELD) :: field_13, field_14, field_15, field_16, field_17, field_18, field_19 216 209 TYPE(FIELD) , DIMENSION(jpnoumax) :: zfield 217 218 NAMELIST/namiceout/ noumef, & 219 field_1 , field_2 , field_3 , field_4 , field_5 , field_6 , & 220 field_7 , field_8 , field_9 , field_10, field_11, field_12, & 221 field_13, field_14, field_15, field_16, field_17, field_18, & 222 field_19 210 !! 211 NAMELIST/namiceout/ noumef, & 212 field_1 , field_2 , field_3 , field_4 , field_5 , field_6 , & 213 field_7 , field_8 , field_9 , field_10, field_11, field_12, & 214 field_13, field_14, field_15, field_16, field_17, field_18, field_19 223 215 !!------------------------------------------------------------------- 224 216 … … 246 238 zfield(19) = field_19 247 239 248 DO nf = 1, noumef249 titn ( nf) = zfield(nf)%ztitle250 nam ( nf) = zfield(nf)%zname251 uni ( nf) = zfield(nf)%zunit252 nc ( nf) = zfield(nf)%znc253 cmulti( nf) = zfield(nf)%zcmulti254 cadd ( nf) = zfield(nf)%zcadd240 DO jf = 1, noumef 241 titn (jf) = zfield(jf)%ztitle 242 nam (jf) = zfield(jf)%zname 243 uni (jf) = zfield(jf)%zunit 244 nc (jf) = zfield(jf)%znc 245 cmulti(jf) = zfield(jf)%zcmulti 246 cadd (jf) = zfield(jf)%zcadd 255 247 END DO 256 248 … … 262 254 WRITE(numout,*) ' title name unit Saving (1/0) ', & 263 255 & ' multiplicative constant additive constant ' 264 DO nf = 1 , noumef265 WRITE(numout,*) ' ', titn( nf), ' ', nam(nf),' ', uni(nf),' ', nc(nf),' ', cmulti(nf), &266 & ' ', cadd( nf)256 DO jf = 1 , noumef 257 WRITE(numout,*) ' ', titn(jf), ' ', nam(jf),' ', uni(jf),' ', nc(jf),' ', cmulti(jf), & 258 & ' ', cadd(jf) 267 259 END DO 268 260 ENDIF … … 281 273 !! Used to find errors in the initial state or save the last 282 274 !! ocean state in case of abnormal end of a simulation 283 !!284 !! History :285 !! 2.0 ! 2009-06 (B. Lemaire)286 275 !!---------------------------------------------------------------------- 287 276 INTEGER, INTENT( in ) :: kt ! ocean time-step index)
Note: See TracChangeset
for help on using the changeset viewer.