- Timestamp:
- 2020-12-04T11:17:01+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0.4_GO8_package/src/OCE/DIA/diawri.F90
r14075 r14078 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 … … 233 256 IF( iom_use('logavs') ) CALL iom_put( "logavs", LOG( MAX( 1.e-20_wp, avs(:,:,:) ) ) ) 234 257 235 IF ( iom_use("sstgrad ") .OR. iom_use("sstgrad2") ) THEN258 IF ( iom_use("sstgrad_"//ttype) .OR. iom_use("sstgrad2_"//ttype) ) THEN 236 259 DO jj = 2, jpjm1 ! sst gradient 237 260 DO ji = fs_2, fs_jpim1 ! vector opt. … … 244 267 END DO 245 268 CALL lbc_lnk( 'diawri', z2d, 'T', 1. ) 246 CALL iom_put( "sstgrad2 ", z2d ) ! square of module of sst gradient269 CALL iom_put( "sstgrad2_"//ttype, z2d ) ! square of module of sst gradient 247 270 z2d(:,:) = SQRT( z2d(:,:) ) 248 CALL iom_put( "sstgrad ", z2d ) ! module of sst gradient271 CALL iom_put( "sstgrad_"//ttype , z2d ) ! module of sst gradient 249 272 ENDIF 250 273 … … 365 388 ENDIF 366 389 367 IF( iom_use("tosmint ") ) THEN390 IF( iom_use("tosmint_"//ttype) ) THEN 368 391 z2d(:,:) = 0._wp 369 392 DO jk = 1, jpkm1 … … 375 398 END DO 376 399 CALL lbc_lnk( 'diawri', z2d, 'T', -1. ) 377 CALL iom_put( "tosmint ", rau0 * z2d ) ! Vertical integral of temperature378 ENDIF 379 IF( iom_use("somint ") ) THEN400 CALL iom_put( "tosmint_"//ttype, rau0 * z2d ) ! Vertical integral of temperature 401 ENDIF 402 IF( iom_use("somint_"//stype) ) THEN 380 403 z2d(:,:)=0._wp 381 404 DO jk = 1, jpkm1 … … 387 410 END DO 388 411 CALL lbc_lnk( 'diawri', z2d, 'T', -1. ) 389 CALL iom_put( "somint ", rau0 * z2d ) ! Vertical integral of salinity412 CALL iom_put( "somint_"//stype, rau0 * z2d ) ! Vertical integral of salinity 390 413 ENDIF 391 414 … … 930 953 CALL iom_rstput( 0, 0, inum, 'sdvecrtz', wsd ) ! now StokesDrift k-velocity 931 954 ENDIF 932 933 955 #if defined key_si3 934 956 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.