- Timestamp:
- 2020-04-03T13:09:33+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.2_GO8_package/src/OCE/DIA/diawri.F90
r12658 r12660 49 49 USE iom ! 50 50 USE ioipsl ! 51 51 USE eosbn2 52 52 #if defined key_si3 53 53 USE ice … … 113 113 REAL(wp), DIMENSION(jpi,jpj) :: z2d ! 2D workspace 114 114 REAL(wp), DIMENSION(jpi,jpj,jpk) :: z3d ! 3D workspace 115 CHARACTER(len=4),SAVE :: ttype , stype ! temperature and salinity type 115 116 !!---------------------------------------------------------------------- 116 117 ! 118 IF( kt == nit000 ) THEN 119 IF( ln_TEOS10 ) THEN 120 IF ( iom_use("toce_pot") .OR. iom_use("soce_pra") .OR. iom_use("sst_pot") .OR. iom_use("sss_pra") & 121 & .OR. iom_use("sbt_pot") .OR. iom_use("sbs_pra") .OR. iom_use("sstgrad_pot") .OR. iom_use("sstgrad2_pot") & 122 & .OR. iom_use("tosmint_pot") .OR. iom_use("somint_pra")) THEN 123 CALL ctl_stop( 'diawri: potential temperature and practical salinity not available with ln_TEOS10' ) 124 ELSE 125 ttype='con' ; stype='abs' ! teos-10 using conservative temperature and absolute salinity 126 ENDIF 127 ELSE IF( ln_EOS80 ) THEN 128 IF ( iom_use("toce_con") .OR. iom_use("soce_abs") .OR. iom_use("sst_con") .OR. iom_use("sss_abs") & 129 & .OR. iom_use("sbt_con") .OR. iom_use("sbs_abs") .OR. iom_use("sstgrad_con") .OR. iom_use("sstgrad2_con") & 130 & .OR. iom_use("tosmint_con") .OR. iom_use("somint_abs")) THEN 131 CALL ctl_stop( 'diawri: conservative temperature and absolute salinity not available with ln_EOS80' ) 132 ELSE 133 ttype='pot' ; stype='pra' ! eos-80 using potential temperature and practical salinity 134 ENDIF 135 ELSE IF ( ln_SEOS) THEN 136 ttype='seos' ; stype='seos' ! seos using Simplified Equation of state 137 ENDIF 138 ENDIF 139 117 140 IF( ln_timing ) CALL timing_start('dia_wri') 118 141 ! … … 144 167 CALL iom_put( "wetdep" , ht_0(:,:) + sshn(:,:) ) 145 168 146 CALL iom_put( "toce ", tsn(:,:,:,jp_tem) ) ! 3D temperature147 CALL iom_put( "sst ", tsn(:,:,1,jp_tem) ) ! surface temperature148 IF ( iom_use("sbt ") ) THEN169 CALL iom_put( "toce_"//ttype, tsn(:,:,:,jp_tem) ) ! 3D temperature 170 CALL iom_put( "sst_"//ttype, tsn(:,:,1,jp_tem) ) ! surface temperature 171 IF ( iom_use("sbt_"//ttype) ) THEN 149 172 DO jj = 1, jpj 150 173 DO ji = 1, jpi … … 153 176 END DO 154 177 END DO 155 CALL iom_put( "sbt ", z2d ) ! bottom temperature178 CALL iom_put( "sbt_"//ttype, z2d ) ! bottom temperature 156 179 ENDIF 157 180 158 CALL iom_put( "soce ", tsn(:,:,:,jp_sal) ) ! 3D salinity159 CALL iom_put( "sss ", tsn(:,:,1,jp_sal) ) ! surface salinity160 IF ( iom_use("sbs ") ) THEN181 CALL iom_put( "soce_"//stype, tsn(:,:,:,jp_sal) ) ! 3D salinity 182 CALL iom_put( "sss_"//stype, tsn(:,:,1,jp_sal) ) ! surface salinity 183 IF ( iom_use("sbs_"//stype) ) THEN 161 184 DO jj = 1, jpj 162 185 DO ji = 1, jpi … … 165 188 END DO 166 189 END DO 167 CALL iom_put( "sbs ", z2d ) ! bottom salinity190 CALL iom_put( "sbs_"//stype, z2d ) ! bottom salinity 168 191 ENDIF 169 192 … … 231 254 IF( iom_use('logavs') ) CALL iom_put( "logavs", LOG( MAX( 1.e-20_wp, avs(:,:,:) ) ) ) 232 255 233 IF ( iom_use("sstgrad ") .OR. iom_use("sstgrad2") ) THEN256 IF ( iom_use("sstgrad_"//ttype) .OR. iom_use("sstgrad2_"//ttype) ) THEN 234 257 DO jj = 2, jpjm1 ! sst gradient 235 258 DO ji = fs_2, fs_jpim1 ! vector opt. … … 242 265 END DO 243 266 CALL lbc_lnk( 'diawri', z2d, 'T', 1. ) 244 CALL iom_put( "sstgrad2 ", z2d ) ! square of module of sst gradient267 CALL iom_put( "sstgrad2_"//ttype, z2d ) ! square of module of sst gradient 245 268 z2d(:,:) = SQRT( z2d(:,:) ) 246 CALL iom_put( "sstgrad ", z2d ) ! module of sst gradient269 CALL iom_put( "sstgrad_"//ttype , z2d ) ! module of sst gradient 247 270 ENDIF 248 271 … … 363 386 ENDIF 364 387 365 IF( iom_use("tosmint ") ) THEN388 IF( iom_use("tosmint_"//ttype) ) THEN 366 389 z2d(:,:) = 0._wp 367 390 DO jk = 1, jpkm1 … … 373 396 END DO 374 397 CALL lbc_lnk( 'diawri', z2d, 'T', -1. ) 375 CALL iom_put( "tosmint ", rau0 * z2d ) ! Vertical integral of temperature376 ENDIF 377 IF( iom_use("somint ") ) THEN398 CALL iom_put( "tosmint_"//ttype, rau0 * z2d ) ! Vertical integral of temperature 399 ENDIF 400 IF( iom_use("somint_"//stype) ) THEN 378 401 z2d(:,:)=0._wp 379 402 DO jk = 1, jpkm1 … … 385 408 END DO 386 409 CALL lbc_lnk( 'diawri', z2d, 'T', -1. ) 387 CALL iom_put( "somint ", rau0 * z2d ) ! Vertical integral of salinity410 CALL iom_put( "somint_"//stype, rau0 * z2d ) ! Vertical integral of salinity 388 411 ENDIF 389 412 … … 923 946 CALL iom_rstput( 0, 0, inum, 'sdvecrtz', wsd ) ! now StokesDrift k-velocity 924 947 ENDIF 925 926 948 #if defined key_si3 927 949 IF( nn_ice == 2 ) THEN ! condition needed in case agrif + ice-model but no-ice in child grid
Note: See TracChangeset
for help on using the changeset viewer.