- Timestamp:
- 2020-03-19T15:52:52+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.1_GO8_package/src/OCE/DIA/diawri.F90
r11715 r12574 50 50 USE iom ! 51 51 USE ioipsl ! 52 52 USE eosbn2 53 53 #if defined key_si3 54 54 USE ice … … 114 114 REAL(wp), DIMENSION(jpi,jpj) :: z2d ! 2D workspace 115 115 REAL(wp), DIMENSION(jpi,jpj,jpk) :: z3d ! 3D workspace 116 CHARACTER(len=4),SAVE :: ttype , stype ! temperature and salinity type 116 117 !!---------------------------------------------------------------------- 117 118 ! 119 IF( kt == nit000 ) THEN 120 IF( ln_TEOS10 ) THEN 121 IF ( iom_use("toce_pot") .OR. iom_use("soce_pra") .OR. iom_use("sst_pot") .OR. iom_use("sss_pra") & 122 & .OR. iom_use("sbt_pot") .OR. iom_use("sbs_pra") .OR. iom_use("sstgrad_pot") .OR. iom_use("sstgrad2_pot") & 123 & .OR. iom_use("tosmint_pot") .OR. iom_use("somint_pra")) THEN 124 CALL ctl_stop( 'diawri: potential temperature and practical salinity not available with ln_TEOS10' ) 125 ELSE 126 ttype='con' ; stype='abs' ! teos-10 using conservative temperature and absolute salinity 127 ENDIF 128 ELSE IF( ln_EOS80 ) THEN 129 IF ( iom_use("toce_con") .OR. iom_use("soce_abs") .OR. iom_use("sst_con") .OR. iom_use("sss_abs") & 130 & .OR. iom_use("sbt_con") .OR. iom_use("sbs_abs") .OR. iom_use("sstgrad_con") .OR. iom_use("sstgrad2_con") & 131 & .OR. iom_use("tosmint_con") .OR. iom_use("somint_abs")) THEN 132 CALL ctl_stop( 'diawri: conservative temperature and absolute salinity not available with ln_EOS80' ) 133 ELSE 134 ttype='pot' ; stype='pra' ! eos-80 using potential temperature and practical salinity 135 ENDIF 136 ELSE IF ( ln_SEOS) THEN 137 ttype='seos' ; stype='seos' ! seos using Simplified Equation of state 138 ENDIF 139 ENDIF 140 118 141 IF( ln_timing ) CALL timing_start('dia_wri') 119 142 ! … … 145 168 CALL iom_put( "wetdep" , ht_0(:,:) + sshn(:,:) ) 146 169 147 CALL iom_put( "toce ", tsn(:,:,:,jp_tem) ) ! 3D temperature148 CALL iom_put( "sst ", tsn(:,:,1,jp_tem) ) ! surface temperature149 IF ( iom_use("sbt ") ) THEN170 CALL iom_put( "toce_"//ttype, tsn(:,:,:,jp_tem) ) ! 3D temperature 171 CALL iom_put( "sst_"//ttype, tsn(:,:,1,jp_tem) ) ! surface temperature 172 IF ( iom_use("sbt_"//ttype) ) THEN 150 173 DO jj = 1, jpj 151 174 DO ji = 1, jpi … … 154 177 END DO 155 178 END DO 156 CALL iom_put( "sbt ", z2d ) ! bottom temperature179 CALL iom_put( "sbt_"//ttype, z2d ) ! bottom temperature 157 180 ENDIF 158 181 159 CALL iom_put( "soce ", tsn(:,:,:,jp_sal) ) ! 3D salinity160 CALL iom_put( "sss ", tsn(:,:,1,jp_sal) ) ! surface salinity161 IF ( iom_use("sbs ") ) THEN182 CALL iom_put( "soce_"//stype, tsn(:,:,:,jp_sal) ) ! 3D salinity 183 CALL iom_put( "sss_"//stype, tsn(:,:,1,jp_sal) ) ! surface salinity 184 IF ( iom_use("sbs_"//stype) ) THEN 162 185 DO jj = 1, jpj 163 186 DO ji = 1, jpi … … 166 189 END DO 167 190 END DO 168 CALL iom_put( "sbs ", z2d ) ! bottom salinity191 CALL iom_put( "sbs_"//stype, z2d ) ! bottom salinity 169 192 ENDIF 170 193 … … 232 255 IF( iom_use('logavs') ) CALL iom_put( "logavs", LOG( MAX( 1.e-20_wp, avs(:,:,:) ) ) ) 233 256 234 IF ( iom_use("sstgrad ") .OR. iom_use("sstgrad2") ) THEN257 IF ( iom_use("sstgrad_"//ttype) .OR. iom_use("sstgrad2_"//ttype) ) THEN 235 258 DO jj = 2, jpjm1 ! sst gradient 236 259 DO ji = fs_2, fs_jpim1 ! vector opt. … … 243 266 END DO 244 267 CALL lbc_lnk( 'diawri', z2d, 'T', 1. ) 245 CALL iom_put( "sstgrad2 ", z2d ) ! square of module of sst gradient268 CALL iom_put( "sstgrad2_"//ttype, z2d ) ! square of module of sst gradient 246 269 z2d(:,:) = SQRT( z2d(:,:) ) 247 CALL iom_put( "sstgrad ", z2d ) ! module of sst gradient270 CALL iom_put( "sstgrad_"//ttype , z2d ) ! module of sst gradient 248 271 ENDIF 249 272 … … 364 387 ENDIF 365 388 366 IF( iom_use("tosmint ") ) THEN389 IF( iom_use("tosmint_"//ttype) ) THEN 367 390 z2d(:,:) = 0._wp 368 391 DO jk = 1, jpkm1 … … 374 397 END DO 375 398 CALL lbc_lnk( 'diawri', z2d, 'T', -1. ) 376 CALL iom_put( "tosmint ", rau0 * z2d ) ! Vertical integral of temperature377 ENDIF 378 IF( iom_use("somint ") ) THEN399 CALL iom_put( "tosmint_"//ttype, rau0 * z2d ) ! Vertical integral of temperature 400 ENDIF 401 IF( iom_use("somint_"//stype) ) THEN 379 402 z2d(:,:)=0._wp 380 403 DO jk = 1, jpkm1 … … 386 409 END DO 387 410 CALL lbc_lnk( 'diawri', z2d, 'T', -1. ) 388 CALL iom_put( "somint ", rau0 * z2d ) ! Vertical integral of salinity411 CALL iom_put( "somint_"//stype, rau0 * z2d ) ! Vertical integral of salinity 389 412 ENDIF 390 413 … … 926 949 CALL iom_rstput( 0, 0, inum, 'sdvecrtz', wsd ) ! now StokesDrift k-velocity 927 950 ENDIF 928 929 951 #if defined key_si3 930 952 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.