Changeset 13899 for NEMO/branches/2020/tickets_icb_1900/src/OFF/dtadyn.F90
- Timestamp:
- 2020-11-27T17:26:33+01:00 (4 years ago)
- Location:
- NEMO/branches/2020/tickets_icb_1900
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/tickets_icb_1900
- Property svn:externals
-
NEMO/branches/2020/tickets_icb_1900/src/OFF/dtadyn.F90
r13237 r13899 71 71 INTEGER , SAVE :: jf_uwd ! index of u-transport 72 72 INTEGER , SAVE :: jf_vwd ! index of v-transport 73 INTEGER , SAVE :: jf_wwd ! index of v-transport73 INTEGER , SAVE :: jf_wwd ! index of w-transport 74 74 INTEGER , SAVE :: jf_avt ! index of Kz 75 75 INTEGER , SAVE :: jf_mld ! index of mixed layer deptht … … 128 128 ! 129 129 IF( kt == nit000 ) THEN ; nprevrec = 0 130 ELSE ; nprevrec = sf_dyn(jf_tem)%nrec _a(2)130 ELSE ; nprevrec = sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa) 131 131 ENDIF 132 132 CALL fld_read( kt, 1, sf_dyn ) != read data at kt time step ==! … … 294 294 ! ! fill sf with slf_i and control print 295 295 CALL fld_fill( sf_dyn, slf_d, cn_dir, 'dta_dyn_init', 'Data in file', 'namdta_dyn' ) 296 sf_dyn(jf_uwd)%cltype = 'U' ; sf_dyn(jf_uwd)%zsgn = -1._wp 297 sf_dyn(jf_vwd)%cltype = 'V' ; sf_dyn(jf_vwd)%zsgn = -1._wp 298 ! 299 IF( ln_trabbl ) THEN 300 sf_dyn(jf_ubl)%cltype = 'U' ; sf_dyn(jf_ubl)%zsgn = 1._wp 301 sf_dyn(jf_vbl)%cltype = 'V' ; sf_dyn(jf_vbl)%zsgn = 1._wp 302 END IF 296 303 ! 297 304 ! Open file for each variable to get his number of dimension … … 330 337 iom_varid( numrtr, 'sshn', ldstop = .FALSE. ) > 0 ) THEN 331 338 IF(lwp) WRITE(numout,*) ' ssh(:,:,Kmm) forcing fields read in the restart file for initialisation' 332 CALL iom_get( numrtr, jpdom_auto glo, 'sshn', ssh(:,:,Kmm) )333 CALL iom_get( numrtr, jpdom_auto glo, 'sshb', ssh(:,:,Kbb) )339 CALL iom_get( numrtr, jpdom_auto, 'sshn', ssh(:,:,Kmm) ) 340 CALL iom_get( numrtr, jpdom_auto, 'sshb', ssh(:,:,Kbb) ) 334 341 ELSE 335 342 IF(lwp) WRITE(numout,*) ' ssh(:,:,Kmm) forcing fields read in the restart file for initialisation' 336 343 CALL iom_open( 'restart', inum ) 337 CALL iom_get( inum, jpdom_auto glo, 'sshn', ssh(:,:,Kmm) )338 CALL iom_get( inum, jpdom_auto glo, 'sshb', ssh(:,:,Kbb) )344 CALL iom_get( inum, jpdom_auto, 'sshn', ssh(:,:,Kmm) ) 345 CALL iom_get( inum, jpdom_auto, 'sshb', ssh(:,:,Kbb) ) 339 346 CALL iom_close( inum ) ! close file 340 347 ENDIF … … 367 374 gdepw(:,:,1,Kmm) = 0.0_wp 368 375 369 DO_3D _11_11(2, jpk )376 DO_3D( 1, 1, 1, 1, 2, jpk ) 370 377 ! zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk)) ! 0 everywhere 371 378 ! tmask = wmask, ie everywhere expect at jk = mikt … … 388 395 IF(lwp) WRITE(numout,*) ' read in the file depht over which runoffs are distributed' 389 396 CALL iom_open ( "runoffs", inum ) ! open file 390 CALL iom_get ( inum, jpdom_ data, 'rodepth', h_rnf ) ! read the river mouth array397 CALL iom_get ( inum, jpdom_global, 'rodepth', h_rnf ) ! read the river mouth array 391 398 CALL iom_close( inum ) ! close file 392 399 ! 393 400 nk_rnf(:,:) = 0 ! set the number of level over which river runoffs are applied 394 DO_2D _11_11401 DO_2D( 1, 1, 1, 1 ) 395 402 IF( h_rnf(ji,jj) > 0._wp ) THEN 396 403 jk = 2 … … 405 412 ENDIF 406 413 END_2D 407 !!st pourquoi on n'utilise pas le gde3w ici plutôt que de faire une boucle ? 408 DO_2D_11_11 414 DO_2D( 1, 1, 1, 1 ) ! set the associated depth 409 415 h_rnf(ji,jj) = 0._wp 410 416 DO jk = 1, nk_rnf(ji,jj) … … 452 458 ! 453 459 IF( kt == nit000 ) THEN ; nprevrec = 0 454 ELSE ; nprevrec = sf_dyn(jf_tem)%nrec _a(2)460 ELSE ; nprevrec = sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa) 455 461 ENDIF 456 462 CALL fld_read( kt, 1, sf_dyn ) != read data at kt time step ==! … … 601 607 gdepw(:,:,1,Kmm) = 0.0_wp 602 608 ! 603 DO_3D _11_11(2, jpk )609 DO_3D( 1, 1, 1, 1, 2, jpk ) 604 610 zcoef = (tmask(ji,jj,jk) - wmask(ji,jj,jk)) 605 611 gdepw(ji,jj,jk,Kmm) = gdepw(ji,jj,jk-1,Kmm) + e3t(ji,jj,jk-1,Kmm) … … 681 687 !!---------------------------------------------------------------------- 682 688 ! 683 !!st code dupliqué même remarque que plus haut pourquoi ne pas utiliser gdepw ? 684 DO_2D_11_11 689 DO_2D( 1, 1, 1, 1 ) ! update the depth over which runoffs are distributed 685 690 h_rnf(ji,jj) = 0._wp 686 691 DO jk = 1, nk_rnf(ji,jj) ! recalculates h_rnf to be the depth in metres … … 711 716 !!--------------------------------------------------------------------- 712 717 ! 713 IF( sf_dyn(jf_tem)%ln_tint ) THEN ! Computes slopes (here avt is used as workspace) 718 IF( sf_dyn(jf_tem)%ln_tint ) THEN ! Computes slopes (here avt is used as workspace) 719 ! 714 720 IF( kt == nit000 ) THEN 715 721 IF(lwp) WRITE(numout,*) ' Compute new slopes at kt = ', kt 716 zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:, 1) * tmask(:,:,:) ! temperature717 zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:, 1) * tmask(:,:,:) ! salinity718 avt(:,:,:) = sf_dyn(jf_avt)%fdta(:,:,:, 1) * tmask(:,:,:) ! vertical diffusive coef.722 zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,sf_dyn(jf_tem)%nbb) * tmask(:,:,:) ! temperature 723 zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,sf_dyn(jf_sal)%nbb) * tmask(:,:,:) ! salinity 724 avt(:,:,:) = sf_dyn(jf_avt)%fdta(:,:,:,sf_dyn(jf_avt)%nbb) * tmask(:,:,:) ! vertical diffusive coef. 719 725 CALL compute_slopes( kt, zts, zuslp, zvslp, zwslpi, zwslpj, Kbb, Kmm ) 720 726 uslpdta (:,:,:,1) = zuslp (:,:,:) … … 723 729 wslpjdta(:,:,:,1) = zwslpj(:,:,:) 724 730 ! 725 zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:, 2) * tmask(:,:,:) ! temperature726 zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:, 2) * tmask(:,:,:) ! salinity727 avt(:,:,:) = sf_dyn(jf_avt)%fdta(:,:,:, 2) * tmask(:,:,:) ! vertical diffusive coef.731 zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,sf_dyn(jf_tem)%naa) * tmask(:,:,:) ! temperature 732 zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,sf_dyn(jf_sal)%naa) * tmask(:,:,:) ! salinity 733 avt(:,:,:) = sf_dyn(jf_avt)%fdta(:,:,:,sf_dyn(jf_avt)%naa) * tmask(:,:,:) ! vertical diffusive coef. 728 734 CALL compute_slopes( kt, zts, zuslp, zvslp, zwslpi, zwslpj, Kbb, Kmm ) 729 735 uslpdta (:,:,:,2) = zuslp (:,:,:) … … 734 740 ! 735 741 iswap = 0 736 IF( sf_dyn(jf_tem)%nrec _a(2) - nprevrec /= 0 ) iswap = 1737 IF( nsecdyn > sf_dyn(jf_tem)%nrec _b(2) .AND. iswap == 1 ) THEN ! read/update the after data742 IF( sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa) - nprevrec /= 0 ) iswap = 1 743 IF( nsecdyn > sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%nbb) .AND. iswap == 1 ) THEN ! read/update the after data 738 744 IF(lwp) WRITE(numout,*) ' Compute new slopes at kt = ', kt 739 745 uslpdta (:,:,:,1) = uslpdta (:,:,:,2) ! swap the data … … 742 748 wslpjdta(:,:,:,1) = wslpjdta(:,:,:,2) 743 749 ! 744 zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:, 2) * tmask(:,:,:) ! temperature745 zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:, 2) * tmask(:,:,:) ! salinity746 avt(:,:,:) = sf_dyn(jf_avt)%fdta(:,:,:, 2) * tmask(:,:,:) ! vertical diffusive coef.750 zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,sf_dyn(jf_tem)%naa) * tmask(:,:,:) ! temperature 751 zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,sf_dyn(jf_sal)%naa) * tmask(:,:,:) ! salinity 752 avt(:,:,:) = sf_dyn(jf_avt)%fdta(:,:,:,sf_dyn(jf_avt)%naa) * tmask(:,:,:) ! vertical diffusive coef. 747 753 CALL compute_slopes( kt, zts, zuslp, zvslp, zwslpi, zwslpj, Kbb, Kmm ) 748 754 ! … … 756 762 ! 757 763 IF( sf_dyn(jf_tem)%ln_tint ) THEN 758 ztinta = REAL( nsecdyn - sf_dyn(jf_tem)%nrec _b(2), wp ) &759 & / REAL( sf_dyn(jf_tem)%nrec _a(2) - sf_dyn(jf_tem)%nrec_b(2), wp )764 ztinta = REAL( nsecdyn - sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%nbb), wp ) & 765 & / REAL( sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%naa) - sf_dyn(jf_tem)%nrec(2,sf_dyn(jf_tem)%nbb), wp ) 760 766 ztintb = 1. - ztinta 761 767 IF( l_ldfslp .AND. .NOT.lk_c1d ) THEN ! Computes slopes (here avt is used as workspace)
Note: See TracChangeset
for help on using the changeset viewer.