Changeset 15027 for NEMO/branches/2021
- Timestamp:
- 2021-06-19T10:14:22+02:00 (3 years ago)
- Location:
- NEMO/branches/2021/dev_r14318_RK3_stage1
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/IOM/restart.F90
r14992 r15027 325 325 ! 326 326 IF( .NOT.lk_SWE ) THEN 327 IF(.NOT. (iom_varid( numror, 'rhop', ldstop = .FALSE. ) > 0) ) THEN 327 IF( iom_varid( numror, 'rhop', ldstop = .FALSE. ) > 0 ) THEN 328 CALL iom_get( numror, jpdom_auto, 'rhop' , rhop ) ! now potential density 329 ELSE 328 330 #if defined key_RK3 329 CALL eos( ts (:,:,:,:,:), Kbb, rhop)331 CALL eos( ts, Kbb, rhop ) 330 332 #else 331 CALL eos( ts(:,:,:,:,:), Kmm, rhop) 332 ELSE 333 CALL iom_get( numror, jpdom_auto, 'rhop' , rhop ) ! now potential density 333 CALL eos( ts, Kmm, rhop ) 334 334 #endif 335 !!#if defined key_qco 336 !! ALLOCATE( zgdept(jpi,jpj,jpk) ) 337 !! DO jk = 1, jpk 338 !! zgdept(:,:,jk) = gdept(:,:,jk,Kmm) 339 !! END DO 340 !! CALL eos( ts(:,:,:,:,Kmm), rhd, rhop, zgdept ) 341 !! DEALLOCATE( zgdept ) 342 !!#else 343 !! CALL eos( ts(:,:,:,:,Kmm), rhd, rhop, gdept(:,:,:,Kmm) ) 344 !!#endif 335 345 ENDIF 336 346 ENDIF -
NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/TRA/traqsr.F90
r14990 r15027 143 143 ELSE ! No restart or Euler forward at 1st time step 144 144 z1_2 = 1._wp 145 DO_3D( 0,0, 0,0, 1, jpk )145 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk ) 146 146 qsr_hc_b(ji,jj,jk) = 0._wp 147 147 END_3D … … 149 149 ELSE !== Swap of qsr heat content ==! 150 150 z1_2 = 0.5_wp 151 DO_3D( 0,0, 0,0, 1, jpk )151 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpk ) 152 152 qsr_hc_b(ji,jj,jk) = qsr_hc(ji,jj,jk) 153 153 END_3D … … 212 212 ENDIF 213 213 END_2D 214 !!st7-2 end 214 ! !===>>> CAUTION: lbc_lnk is required on fraqsr_lev since sea ice computes on the full domain 215 ! ! otherwise restartability and reproducibility are broken 216 CALL lbc_lnk( 'tra_qsr', fraqsr_1lev(:,:), 'T', 1._wp ) 217 !!st CALL lbc_lnk( 'tra_qsr', qsr_hc(:,:,:), 'T', 1._wp ) 215 218 ! 216 219 ! TEMP: [tiling] This change not necessary and working array can use A2D(nn_hls) if using XIOS (subdomain support) … … 384 387 ! 385 388 DO jk = nk0+1, nkR !* down to Red extinction *! (< ~71 meters : RGB , IR removed from calculation) 386 DO_2D( 0, 0, 0, 0 )389 DO_2D( 0, 0, 0, 0 ) 387 390 ! !- inverse of RGB attenuation lengths 388 391 zlogc = zc(ji,jj,0) … … 429 432 ! 430 433 DO jk = nkR+1, nkG !* down to Green extinction *! (< ~350 m : GB , IR+R removed from calculation) 431 DO_2D( 0, 0, 0, 0 )434 DO_2D( 0, 0, 0, 0 ) 432 435 ! !- inverse of RGB attenuation lengths 433 436 zlogc = zc(ji,jj,0) … … 470 473 ! 471 474 DO jk = nkG+1, nkB !* down to Blue extinction *! (< ~1300 m : B , IR+RG removed from calculation) 472 DO_2D( 0, 0, 0, 0 )475 DO_2D( 0, 0, 0, 0 ) 473 476 ! !- inverse of RGB attenuation lengths 474 477 zlogc = zc(ji,jj,0) … … 558 561 ! 559 562 DO jk = 1, nk0 !* near surface layers *! (< ~12 meters : IR + RGB ) 560 DO_2D( 0, 0, 0, 0 )563 DO_2D( 0, 0, 0, 0 ) 561 564 ze3t = e3t(ji,jj,jk,Kmm) 562 565 zze0 = ze0(ji,jj) * EXP( - ze3t * r1_si0 ) ; zzeR = zeR(ji,jj) * EXP( - ze3t * r1_LR ) ! IR ; Red at jk+1 w-level … … 591 594 ! 592 595 DO jk = nk0+1, nkR !* down to Red extinction *! (< ~71 meters : RGB , IR removed from calculation) 593 DO_2D( 0, 0, 0, 0 )596 DO_2D( 0, 0, 0, 0 ) 594 597 ze3t = e3t(ji,jj,jk,Kmm) 595 598 zzeR = zeR(ji,jj) * EXP( - ze3t * r1_LR ) ! Red at jk+1 w-level -
NEMO/branches/2021/dev_r14318_RK3_stage1/tests/ISOMIP+/MY_SRC/eosbn2.F90
r14135 r15027 17 17 !! 3.3 ! 2010-05 (C. Ethe, G. Madec) merge TRC-TRA 18 18 !! - ! 2010-10 (G. Nurser, G. Madec) add alpha/beta used in ldfslp 19 !! 3.7 ! 2012-0 3(F. Roquet, G. Madec) add primitive of alpha and beta used in PE computation19 !! 3.7 ! 2012-0 3 (F. Roquet, G. Madec) add primitive of alpha and beta used in PE computation 20 20 !! - ! 2012-05 (F. Roquet) add Vallis and original JM95 equation of state 21 21 !! - ! 2013-04 (F. Roquet, G. Madec) add eos_rab, change bn2 computation and reorganize the module … … 56 56 ! !! * Interface 57 57 INTERFACE eos 58 MODULE PROCEDURE eos_insitu , eos_insitu_pot, eos_insitu_2d, eos_insitu_pot_2d58 MODULE PROCEDURE eos_insitu_New, eos_insitu, eos_insitu_pot, eos_insitu_2d, eos_insitu_pot_2d 59 59 END INTERFACE 60 60 ! … … 191 191 CONTAINS 192 192 193 SUBROUTINE eos_insitu_New( pts, Knn, prd ) 194 !!---------------------------------------------------------------------- 195 !! *** ROUTINE eos_insitu *** 196 !! 197 !! ** Purpose : Compute the in situ density (ratio rho/rho0) from 198 !! potential temperature and salinity using an equation of state 199 !! selected in the nameos namelist 200 !! 201 !! ** Method : prd(t,s,z) = ( rho(t,s,z) - rho0 ) / rho0 202 !! with prd in situ density anomaly no units 203 !! t TEOS10: CT or EOS80: PT Celsius 204 !! s TEOS10: SA or EOS80: SP TEOS10: g/kg or EOS80: psu 205 !! z depth meters 206 !! rho in situ density kg/m^3 207 !! rho0 reference density kg/m^3 208 !! 209 !! ln_teos10 : polynomial TEOS-10 equation of state is used for rho(t,s,z). 210 !! Check value: rho = 1028.21993233072 kg/m^3 for z=3000 dbar, ct=3 Celsius, sa=35.5 g/kg 211 !! 212 !! ln_eos80 : polynomial EOS-80 equation of state is used for rho(t,s,z). 213 !! Check value: rho = 1028.35011066567 kg/m^3 for z=3000 dbar, pt=3 Celsius, sp=35.5 psu 214 !! 215 !! ln_seos : simplified equation of state 216 !! prd(t,s,z) = ( -a0*(1+lambda/2*(T-T0)+mu*z+nu*(S-S0))*(T-T0) + b0*(S-S0) ) / rho0 217 !! linear case function of T only: rn_alpha<>0, other coefficients = 0 218 !! linear eos function of T and S: rn_alpha and rn_beta<>0, other coefficients=0 219 !! Vallis like equation: use default values of coefficients 220 !! 221 !! ln_leos : linear ISOMIP equation of state 222 !! prd(t,s,z) = ( -a0*(T-T0) + b0*(S-S0) ) / rho0 223 !! setup for ISOMIP linear eos 224 !! 225 !! ** Action : compute prd , the in situ density (no units) 226 !! 227 !! References : Roquet et al, Ocean Modelling, in preparation (2014) 228 !! Vallis, Atmospheric and Oceanic Fluid Dynamics, 2006 229 !! TEOS-10 Manual, 2010 230 !!---------------------------------------------------------------------- 231 REAL(wp), DIMENSION(:,:,:,:,:), INTENT(in ) :: pts ! T-S 232 INTEGER , INTENT(in ) :: Knn ! time-level 233 REAL(wp), DIMENSION(:,:,: ), INTENT( out) :: prd ! in situ density 234 ! 235 INTEGER :: ji, jj, jk ! dummy loop indices 236 REAL(wp) :: zt , zh , zs , ztm ! local scalars 237 REAL(wp) :: zn , zn0, zn1, zn2, zn3 ! - - 238 !!---------------------------------------------------------------------- 239 ! 240 IF( ln_timing ) CALL timing_start('eos-insitu') 241 ! 242 SELECT CASE( neos ) 243 ! 244 CASE( np_teos10, np_eos80 ) !== polynomial TEOS-10 / EOS-80 ==! 245 ! 246 DO_3D(nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 247 ! 248 zh = gdept(ji,jj,jk,Knn) * r1_Z0 ! depth 249 zt = pts (ji,jj,jk,jp_tem,Knn) * r1_T0 ! temperature 250 zs = SQRT( ABS( pts(ji,jj,jk,jp_sal,Knn) + rdeltaS ) * r1_S0 ) ! square root salinity 251 ztm = tmask(ji,jj,jk) ! tmask 252 ! 253 zn3 = EOS013*zt & 254 & + EOS103*zs+EOS003 255 ! 256 zn2 = (EOS022*zt & 257 & + EOS112*zs+EOS012)*zt & 258 & + (EOS202*zs+EOS102)*zs+EOS002 259 ! 260 zn1 = (((EOS041*zt & 261 & + EOS131*zs+EOS031)*zt & 262 & + (EOS221*zs+EOS121)*zs+EOS021)*zt & 263 & + ((EOS311*zs+EOS211)*zs+EOS111)*zs+EOS011)*zt & 264 & + (((EOS401*zs+EOS301)*zs+EOS201)*zs+EOS101)*zs+EOS001 265 ! 266 zn0 = (((((EOS060*zt & 267 & + EOS150*zs+EOS050)*zt & 268 & + (EOS240*zs+EOS140)*zs+EOS040)*zt & 269 & + ((EOS330*zs+EOS230)*zs+EOS130)*zs+EOS030)*zt & 270 & + (((EOS420*zs+EOS320)*zs+EOS220)*zs+EOS120)*zs+EOS020)*zt & 271 & + ((((EOS510*zs+EOS410)*zs+EOS310)*zs+EOS210)*zs+EOS110)*zs+EOS010)*zt & 272 & + (((((EOS600*zs+EOS500)*zs+EOS400)*zs+EOS300)*zs+EOS200)*zs+EOS100)*zs+EOS000 273 ! 274 zn = ( ( zn3 * zh + zn2 ) * zh + zn1 ) * zh + zn0 275 ! 276 prd(ji,jj,jk) = ( zn * r1_rho0 - 1._wp ) * ztm ! density anomaly (masked) 277 ! 278 END_3D 279 ! 280 CASE( np_seos ) !== simplified EOS ==! 281 ! 282 DO_3D( nn_hls, nn_hls, nn_hls, nn_hls, 1, jpkm1 ) 283 zt = pts (ji,jj,jk,jp_tem,Knn) - 10._wp 284 zs = pts (ji,jj,jk,jp_sal,Knn) - 35._wp 285 zh = gdept(ji,jj,jk,Knn) 286 ztm = tmask(ji,jj,jk) 287 ! 288 zn = - rn_a0 * ( 1._wp + 0.5_wp*rn_lambda1*zt + rn_mu1*zh ) * zt & 289 & + rn_b0 * ( 1._wp - 0.5_wp*rn_lambda2*zs - rn_mu2*zh ) * zs & 290 & - rn_nu * zt * zs 291 ! 292 prd(ji,jj,jk) = zn * r1_rho0 * ztm ! density anomaly (masked) 293 END_3D 294 ! 295 CASE( np_leos ) !== linear ISOMIP EOS ==! 296 ! 297 DO_3D( 1, 1, 1, 1, 1, jpkm1 ) 298 zt = pts (ji,jj,jk,jp_tem,Knn) - (-1._wp) 299 zs = pts (ji,jj,jk,jp_sal,Knn) - 34.2_wp 300 zh = gdept(ji,jj,jk, Knn) 301 ztm = tmask(ji,jj,jk) 302 ! 303 zn = rho0 * ( - rn_a0 * zt + rn_b0 * zs ) 304 ! 305 prd(ji,jj,jk) = zn * r1_rho0 * ztm ! density anomaly (masked) 306 END_3D 307 ! 308 END SELECT 309 ! 310 IF(sn_cfctl%l_prtctl) CALL prt_ctl( tab3d_1=prd, clinfo1=' eos-insitu : ', kdim=jpk ) 311 ! 312 IF( ln_timing ) CALL timing_stop('eos-insitu') 313 ! 314 END SUBROUTINE eos_insitu_New 315 316 193 317 SUBROUTINE eos_insitu( pts, prd, pdep ) 194 318 !!
Note: See TracChangeset
for help on using the changeset viewer.