Changeset 2517
- Timestamp:
- 2010-12-23T17:34:46+01:00 (13 years ago)
- Location:
- branches/nemo_v3_3_beta/NEMOGCM/NEMO
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90
r2445 r2517 36 36 USE iom ! I/O library 37 37 USE lib_mpp ! distributed memory computing library 38 USE prtctl ! print control 38 39 39 40 IMPLICIT NONE … … 62 63 INTEGER :: numfl_t, numfl_u, numfl_v, numfl_w 63 64 64 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: tdta ! temperature at two consecutive times 65 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: sdta ! salinity at two consecutive times 66 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: udta ! zonal velocity at two consecutive times 67 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: vdta ! meridional velocity at two consecutive times 68 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: wdta ! vertical velocity at two consecutive times 69 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: avtdta ! vertical diffusivity coefficient 70 71 REAL(wp), DIMENSION(jpi,jpj ,2) :: hmlddta ! mixed layer depth at two consecutive times 72 REAL(wp), DIMENSION(jpi,jpj ,2) :: wspddta ! wind speed at two consecutive times 73 REAL(wp), DIMENSION(jpi,jpj ,2) :: frlddta ! sea-ice fraction at two consecutive times 74 REAL(wp), DIMENSION(jpi,jpj ,2) :: empdta ! E-P at two consecutive times 75 REAL(wp), DIMENSION(jpi,jpj ,2) :: qsrdta ! short wave heat flux at two consecutive times 65 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: tdta ! temperature at two consecutive times 66 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: sdta ! salinity at two consecutive times 67 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: udta ! zonal velocity at two consecutive times 68 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: vdta ! meridional velocity at two consecutive times 69 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: wdta ! vertical velocity at two consecutive times 70 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: avtdta ! vertical diffusivity coefficient 71 72 REAL(wp), DIMENSION(jpi,jpj ,2) :: hmlddta ! mixed layer depth at two consecutive times 73 REAL(wp), DIMENSION(jpi,jpj ,2) :: wspddta ! wind speed at two consecutive times 74 REAL(wp), DIMENSION(jpi,jpj ,2) :: frlddta ! sea-ice fraction at two consecutive times 75 REAL(wp), DIMENSION(jpi,jpj ,2) :: empdta ! E-P at two consecutive times 76 REAL(wp), DIMENSION(jpi,jpj ,2) :: qsrdta ! short wave heat flux at two consecutive times 77 REAL(wp), DIMENSION(jpi,jpj ,2) :: bblxdta ! frequency of bbl in the x direction at 2 consecutive times 78 REAL(wp), DIMENSION(jpi,jpj ,2) :: bblydta ! frequency of bbl in the y direction at 2 consecutive times 79 LOGICAL :: l_offbbl 76 80 #if defined key_ldfslp 77 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: 78 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: 79 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: 80 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: 81 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: uslpdta ! zonal isopycnal slopes 82 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: vslpdta ! meridional isopycnal slopes 83 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: wslpidta ! zonal diapycnal slopes 84 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: wslpjdta ! meridional diapycnal slopes 81 85 #endif 82 86 #if ! defined key_degrad && defined key_traldf_c2d && defined key_traldf_eiv 83 REAL(wp), DIMENSION(jpi,jpj ,2) :: 87 REAL(wp), DIMENSION(jpi,jpj ,2) :: aeiwdta ! G&M coefficient 84 88 #endif 85 89 #if defined key_degrad 86 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: 90 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: ahtudta, ahtvdta, ahtwdta ! Lateral diffusivity 87 91 # if defined key_traldf_eiv 88 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: 92 REAL(wp), DIMENSION(jpi,jpj,jpk,2) :: aeiudta, aeivdta, aeiwdta ! G&M coefficient 89 93 # endif 90 94 #endif … … 272 276 #endif 273 277 ! 274 IF( lk_trabbl .AND. .NOT. lk_c1d) THEN ! Compute bbl coefficients if needed278 IF( .NOT. l_offbbl ) THEN ! Compute bbl coefficients if needed 275 279 tsb(:,:,:,:) = tsn(:,:,:,:) 276 280 CALL bbl( kt, 'TRC') 277 281 END IF 282 IF(ln_ctl) THEN 283 CALL prt_ctl(tab3d_1=tsn(:,:,:,jp_tem), clinfo1=' tn - : ', mask1=tmask, ovlap=1, kdim=jpk ) 284 CALL prt_ctl(tab3d_1=tsn(:,:,:,jp_sal), clinfo1=' sn - : ', mask1=tmask, ovlap=1, kdim=jpk ) 285 CALL prt_ctl(tab3d_1=un , clinfo1=' un - : ', mask1=tmask, ovlap=1, kdim=jpk ) 286 CALL prt_ctl(tab3d_1=vn , clinfo1=' vn - : ', mask1=tmask, ovlap=1, kdim=jpk ) 287 CALL prt_ctl(tab3d_1=wn , clinfo1=' wn - : ', mask1=tmask, ovlap=1, kdim=jpk ) 288 CALL prt_ctl(tab3d_1=avt , clinfo1=' kz - : ', mask1=tmask, ovlap=1, kdim=jpk ) 289 CALL prt_ctl(tab2d_1=fr_i , clinfo1=' fr_i - : ', mask1=tmask, ovlap=1 ) 290 CALL prt_ctl(tab2d_1=hmld , clinfo1=' hmld - : ', mask1=tmask, ovlap=1 ) 291 CALL prt_ctl(tab2d_1=emps , clinfo1=' emps - : ', mask1=tmask, ovlap=1 ) 292 CALL prt_ctl(tab2d_1=wndm , clinfo1=' wspd - : ', mask1=tmask, ovlap=1 ) 293 CALL prt_ctl(tab2d_1=qsr , clinfo1=' qsr - : ', mask1=tmask, ovlap=1 ) 294 ENDIF 278 295 ! 279 296 END SUBROUTINE dta_dyn … … 291 308 !! 292 309 INTEGER :: jkenr 293 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zu, zv, zw, zt, zs, zavt , zhdiv ! 3D workspace 294 REAL(wp), DIMENSION(jpi,jpj) :: zemp, zqsr, zmld, zice, zwspd, ztaux, ztauy ! 2D workspace 310 REAL(wp), DIMENSION(jpi,jpj,jpk) :: zu, zv, zw, zt, zs, zavt , zhdiv ! 3D workspace 311 REAL(wp), DIMENSION(jpi,jpj) :: zemp, zqsr, zmld, zice, zwspd, ztaux, ztauy ! 2D workspace 312 REAL(wp), DIMENSION(jpi,jpj) :: zbblx, zbbly 313 295 314 #if ! defined key_degrad && defined key_traldf_c2d && defined key_traldf_eiv 296 315 REAL(wp), DIMENSION(jpi,jpj) :: zaeiw … … 348 367 CALL iom_get( numfl_u, jpdom_data, 'vozocrtx', zu (:,:,:), jkenr ) 349 368 CALL iom_get( numfl_v, jpdom_data, 'vomecrty', zv (:,:,:), jkenr ) 369 IF( lk_trabbl .AND. .NOT. lk_c1d .AND. nn_bbl_ldf == 1 ) THEN 370 IF( iom_varid( numfl_u, 'sobblcox', ldstop = .FALSE. ) > 0 .AND. & 371 & iom_varid( numfl_v, 'sobblcoy', ldstop = .FALSE. ) > 0 ) THEN 372 CALL iom_get( numfl_u, jpdom_data, 'sobblcox', zbblx(:,:), jkenr ) 373 CALL iom_get( numfl_v, jpdom_data, 'sobblcoy', zbbly(:,:), jkenr ) 374 l_offbbl = .TRUE. 375 ENDIF 376 ENDIF 350 377 351 378 ! file grid-W … … 405 432 qsrdta (:,:,2) = zqsr(:,:) * tmask(:,:,1) 406 433 hmlddta(:,:,2) = zmld(:,:) * tmask(:,:,1) 434 435 IF( l_offbbl ) THEN 436 bblxdta(:,:,2) = MAX( 0., zbblx(:,:) ) 437 bblydta(:,:,2) = MAX( 0., zbbly(:,:) ) 438 WHERE( bblxdta(:,:,2) > 2. ) bblxdta(:,:,2) = 0. 439 WHERE( bblydta(:,:,2) > 2. ) bblydta(:,:,2) = 0. 440 ENDIF 407 441 408 442 IF( kt == nitend ) THEN … … 589 623 vdta (:,:,:,1) = vdta (:,:,:,2) 590 624 wdta (:,:,:,1) = wdta (:,:,:,2) 591 592 625 #if defined key_ldfslp && ! defined key_c1d 593 626 uslpdta (:,:,:,1) = uslpdta (:,:,:,2) … … 601 634 empdta (:,:,1) = empdta (:,:,2) 602 635 qsrdta (:,:,1) = qsrdta (:,:,2) 636 IF( l_offbbl ) THEN 637 bblxdta(:,:,1) = bblxdta(:,:,2) 638 bblydta(:,:,1) = bblydta(:,:,2) 639 ENDIF 603 640 604 641 #if ! defined key_degrad && defined key_traldf_c2d && defined key_traldf_eiv … … 650 687 emps(:,:) = emp(:,:) 651 688 qsr (:,:) = qsrdta (:,:,2) 652 689 IF( l_offbbl ) THEN 690 ahu_bbl(:,:) = bblxdta(:,:,2) 691 ahv_bbl(:,:) = bblydta(:,:,2) 692 ENDIF 653 693 #if ! defined key_degrad && defined key_traldf_c2d && defined key_traldf_eiv 654 694 aeiw(:,:) = aeiwdta(:,:,2) … … 703 743 emps(:,:) = emp(:,:) 704 744 qsr (:,:) = zweighm1 * qsrdta (:,:,1) + pweigh * qsrdta (:,:,2) 745 IF( l_offbbl ) THEN 746 ahu_bbl(:,:) = zweighm1 * bblxdta(:,:,1) + pweigh * bblxdta(:,:,2) 747 ahv_bbl(:,:) = zweighm1 * bblydta(:,:,1) + pweigh * bblydta(:,:,2) 748 ENDIF 705 749 706 750 #if ! defined key_degrad && defined key_traldf_c2d && defined key_traldf_eiv -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/DOM/daymod.F90
r2353 r2517 33 33 USE prtctl ! Print control 34 34 USE restart ! 35 USE trc_oce, ONLY : lk_offline ! offline flag 35 36 36 37 IMPLICIT NONE … … 80 81 ndt05 = NINT(0.5 * rdttra(1)) 81 82 82 CALL day_rst( nit000, 'READ' )83 IF( .NOT. lk_offline ) CALL day_rst( nit000, 'READ' ) 83 84 84 85 ! set the calandar from ndastp (read in restart file and namelist) … … 254 255 ENDIF 255 256 256 #if ! defined key_offline 257 CALL rst_opn( kt ) ! Open the restart file if needed and control lrst_oce 258 #endif 259 IF( lrst_oce ) CALL day_rst( kt, 'WRITE' ) ! write day restart information 257 IF( .NOT. lk_offline ) CALL rst_opn( kt ) ! Open the restart file if needed and control lrst_oce 258 IF( lrst_oce ) CALL day_rst( kt, 'WRITE' ) ! write day restart information 260 259 ! 261 260 END SUBROUTINE day -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90
r2443 r2517 43 43 PUBLIC bbl ! routine called by trcbbl.F90 and dtadyn.F90 44 44 45 # if defined key_trabbl46 45 LOGICAL, PUBLIC, PARAMETER :: lk_trabbl = .TRUE. !: bottom boundary layer flag 47 # else48 LOGICAL, PUBLIC, PARAMETER :: lk_trabbl = .FALSE. !: bottom boundary layer flag49 # endif50 46 51 47 ! !!* Namelist nambbl * … … 58 54 59 55 REAL(wp), DIMENSION(jpi,jpj), PUBLIC :: utr_bbl , vtr_bbl ! u- (v-) transport in the bottom boundary layer 56 REAL(wp), DIMENSION(jpi,jpj), PUBLIC :: ahu_bbl , ahv_bbl ! masked diffusive bbl coefficients at u and v-points 60 57 61 58 INTEGER , DIMENSION(jpi,jpj) :: mbku_d , mbkv_d ! vertical index of the "lower" bottom ocean U/V-level 62 59 INTEGER , DIMENSION(jpi,jpj) :: mgrhu , mgrhv ! = +/-1, sign of grad(H) in u-(v-)direction 63 60 REAL(wp), DIMENSION(jpi,jpj) :: ahu_bbl_0, ahv_bbl_0 ! diffusive bbl flux coefficients at u and v-points 64 REAL(wp), DIMENSION(jpi,jpj) :: ahu_bbl , ahv_bbl ! masked diffusive bbl coefficients at u and v-points65 61 REAL(wp), DIMENSION(jpi,jpj) :: e3u_bbl_0, e3v_bbl_0 ! thichness of the bbl (e3) at u and v-points 66 62 REAL(wp), DIMENSION(jpi,jpj) :: e1e2t_r ! thichness of the bbl (e3) at u and v-points -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90
r2326 r2517 34 34 !!---------------------------------------------------------------------- 35 35 LOGICAL, PUBLIC, PARAMETER :: lk_qsr_bio = .FALSE. !: bio-model light absorption flag 36 #endif 37 38 #if defined key_offline 39 !!---------------------------------------------------------------------- 40 !! 'key_offline' OFFLINE mode 41 !!---------------------------------------------------------------------- 42 LOGICAL, PUBLIC, PARAMETER :: lk_offline = .TRUE. !: offline flag 43 #else 44 !!---------------------------------------------------------------------- 45 !! Default option NO OFFLINE mode 46 !!---------------------------------------------------------------------- 47 LOGICAL, PUBLIC, PARAMETER :: lk_offline = .FALSE. !: offline flag 36 48 #endif 37 49 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/PISCES/p4zint.F90
r2287 r2517 69 69 END DO 70 70 71 IF( nday_year == 365) THEN71 IF( nday_year == REAL(nyear_len(1), wp) ) THEN 72 72 xksi = xksimax 73 73 xksimax = 0.e0 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/PISCES/p4zprod.F90
r2457 r2517 43 43 grosip = 0.151_wp 44 44 45 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: & 46 & prmax 45 REAL(wp), PUBLIC, DIMENSION(jpi,jpj,jpk) :: prmax 47 46 48 47 REAL(wp) :: & 48 rday1 , & !: 0.6 / rday 49 49 texcret , & !: 1 - excret 50 50 texcret2 , & !: 1 - excret2 … … 105 105 106 106 # if defined key_degrad 107 prmax(:,:,:) = 0.6 / rday* tgfunc(:,:,:) * facvol(:,:,:)107 prmax(:,:,:) = rday1 * tgfunc(:,:,:) * facvol(:,:,:) 108 108 # else 109 prmax(:,:,:) = 0.6 / rday* tgfunc(:,:,:)109 prmax(:,:,:) = rday1 * tgfunc(:,:,:) 110 110 # endif 111 111 112 112 ! compute the day length depending on latitude and the day 113 IF(lwp) write(numout,*) 114 IF(lwp) write(numout,*) 'p4zday : - Julian day ', nday_year 115 IF(lwp) write(numout,*) '~~~~~~' 116 117 IF( nleapy == 1 .AND. MOD( nyear, 4 ) == 0 ) THEN 118 zrum = FLOAT( nday_year - 80 ) / 366. 119 ELSE 120 zrum = FLOAT( nday_year - 80 ) / 365. 121 ENDIF 113 zrum = FLOAT( nday_year - 80 ) / REAL(nyear_len(1), wp) 122 114 zcodel = ASIN( SIN( zrum * rpi * 2. ) * SIN( rad * 23.5 ) ) 123 115 … … 408 400 ENDIF 409 401 402 rday1 = 0.6 / rday 410 403 texcret = 1.0 - excret 411 404 texcret2 = 1.0 - excret2 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/PISCES/trcini_pisces.F90
r2287 r2517 64 64 65 65 ! ! Time-step 66 rfact = rdttr a(1) * float(nn_dttrc)! ---------66 rfact = rdttrc(1) ! --------- 67 67 rfactr = 1. / rfact 68 rfact2 = rfact / float(nrdttrc)68 rfact2 = rfact / FLOAT( nrdttrc ) 69 69 rfact2r = 1. / rfact2 70 70 71 IF(lwp) WRITE(numout,*) ' Tracer time step rfact = ', rfact, ' rdt = ', rdt72 IF(lwp) write(numout,*) ' Biology time step rfact2 = ', rfact271 IF(lwp) WRITE(numout,*) ' Passive Tracer time step rfact = ', rfact, ' rdt = ', rdttra(1) 72 IF(lwp) write(numout,*) ' PISCES Biology time step rfact2 = ', rfact2 73 73 74 74 … … 83 83 84 84 CALL p4z_che ! initialize the chemical constants 85 86 ndayflxtr = 0 ! Initialize a counter for the computation of chemistry87 85 88 86 ! Initialization of tracer concentration in case of no restart -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/PISCES/trcsms_pisces.F90
r2287 r2517 34 34 USE p4zflx ! 35 35 36 USE prtctl_trc 37 36 38 USE trdmod_oce 37 39 USE trdmod_trc … … 67 69 INTEGER :: jnt, jn 68 70 REAL(wp), DIMENSION(jpi,jpj,jpk) :: ztrpis ! used for pisces sms trends 71 CHARACTER (len=25) :: charout 69 72 !!--------------------------------------------------------------------- 70 73 71 74 IF( kt == nit000 ) CALL trc_sms_pisces_init ! Initialization (first time-step only) 72 75 73 IF( ndayflxtr /= nday ) THEN ! New days76 IF( ndayflxtr /= nday_year ) THEN ! New days 74 77 ! 75 ndayflxtr = nday 78 ndayflxtr = nday_year 79 80 IF(lwp) write(numout,*) 81 IF(lwp) write(numout,*) ' New chemical constants and various rates for biogeochemistry at new day : ', nday_year 82 IF(lwp) write(numout,*) '~~~~~~' 76 83 77 84 CALL p4z_che ! computation of chemical constants … … 79 86 ! 80 87 ENDIF 81 82 88 83 89 DO jnt = 1, nrdttrc ! Potential time splitting if requested … … 98 104 CALL lbc_lnk( tra(:,:,:,jn), 'T', 1. ) 99 105 END DO 106 100 107 101 108 IF( l_trdtrc ) THEN … … 162 169 CALL p4z_flx_init ! gas exchange 163 170 171 ndayflxtr = 0 172 164 173 END SUBROUTINE trc_sms_pisces_init 165 174 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/TRP/trcadv.F90
r2402 r2517 69 69 #if ! defined key_pisces 70 70 IF( neuler == 0 .AND. kt == nit000 ) THEN ! at nit000 71 r2dt(:) = rdttr a(:) * FLOAT(nn_dttrc) ! = rdtra(restarting with Euler time stepping)71 r2dt(:) = rdttrc(:) ! = rdttrc (restarting with Euler time stepping) 72 72 ELSEIF( kt <= nit000 + nn_dttrc ) THEN ! at nit000 or nit000+1 73 r2dt(:) = 2. * rdttr a(:) * FLOAT(nn_dttrc) ! = 2 rdttra(leapfrog)73 r2dt(:) = 2. * rdttrc(:) ! = 2 rdttrc (leapfrog) 74 74 ENDIF 75 75 #else 76 r2dt(:) = rdttr a(:) * FLOAT(nn_dttrc) ! = rdtra (restarting withEuler time stepping)76 r2dt(:) = rdttrc(:) ! = rdttrc (for PISCES use Euler time stepping) 77 77 #endif 78 78 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/TRP/trcbbl.F90
r2287 r2517 56 56 !!---------------------------------------------------------------------- 57 57 58 #if ! defined key_offline 59 ! Online coupling with dynamics : Computation of bbl coef and bbl transport 60 ! Offline coupling with dynamics : Read bbl coef and bbl transport from input files 61 CALL bbl( kt, 'TRC' ) 62 l_bbl = .FALSE. 63 #endif 58 IF( .NOT. lk_offline ) THEN 59 CALL bbl( kt, 'TRC' ) ! Online coupling with dynamics : Computation of bbl coef and bbl transport 60 l_bbl = .FALSE. ! Offline coupling with dynamics : Read bbl coef and bbl transport from input files 61 ENDIF 64 62 65 63 IF( l_trdtrc ) THEN -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90
r2287 r2517 111 111 112 112 ! set time step size (Euler/Leapfrog) 113 IF( neuler == 0 .AND. kt == nit000) THEN ; r2dt(:) = rdttr a(:) * FLOAT( nn_dttrc )! at nit000 (Euler)114 ELSEIF( kt <= nit000 + 1 ) THEN ; r2dt(:) = 2.* rdttr a(:) * FLOAT( nn_dttrc )! at nit000 or nit000+1 (Leapfrog)113 IF( neuler == 0 .AND. kt == nit000) THEN ; r2dt(:) = rdttrc(:) ! at nit000 (Euler) 114 ELSEIF( kt <= nit000 + 1 ) THEN ; r2dt(:) = 2.* rdttrc(:) ! at nit000 or nit000+1 (Leapfrog) 115 115 ENDIF 116 116 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
r2287 r2517 80 80 IF( l_trdtrc ) ALLOCATE( ztrtrd(jpi,jpj,jpk) ) 81 81 82 #if ! defined key_offline 83 ! Concentration dilution effect on tracer due to evaporation, precipitation, and river runoff 84 IF( lk_vvl ) THEN ! volume variable 85 zemps(:,:) = emps(:,:) - emp(:,:) 82 IF( lk_offline ) THEN ! emps in dynamical files contains emps - rnf 83 zemps(:,:) = emps(:,:) 84 ELSE ! Concentration dilution effect on tracer due to evaporation, precipitation, and river runoff 85 IF( lk_vvl ) THEN ! volume variable 86 zemps(:,:) = emps(:,:) - emp(:,:) 86 87 !!ch zemps(:,:) = 0. 87 ELSE ! linear free surface 88 IF( ln_rnf ) THEN ; zemps(:,:) = emps(:,:) - rnf(:,:) ! E-P-R 89 ELSE ; zemps(:,:) = emps(:,:) 88 ELSE ! linear free surface 89 IF( ln_rnf ) THEN ; zemps(:,:) = emps(:,:) - rnf(:,:) ! E-P-R 90 ELSE ; zemps(:,:) = emps(:,:) 91 ENDIF 90 92 ENDIF 91 93 ENDIF 92 #else93 ! emps in dynamical files contains emps - rnf94 IF( lk_vvl ) THEN ; zemps(:,:) = 0. ! No concentration/dilution effect95 ELSE ; zemps(:,:) = emps(:,:) ! emps -rnf96 ENDIF97 #endif98 94 99 95 ! 0. initialization -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/TRP/trctrp.F90
r2431 r2517 18 18 USE trabbl ! bottom boundary layer (trc_bbl routine) 19 19 USE trcbbl ! bottom boundary layer (trc_bbl routine) 20 #if ! defined key_offline21 20 USE zdfkpp ! KPP non-local tracer fluxes (trc_kpp routine) 22 #endif23 21 USE trcdmp ! internal damping (trc_dmp routine) 24 22 USE trcldf ! lateral mixing (trc_ldf routine) … … 67 65 CALL trc_adv( kstp ) ! horizontal & vertical advection 68 66 CALL trc_ldf( kstp ) ! lateral mixing 69 #if ! defined key_offline 70 IF( lk_zdfkpp ) CALL trc_kpp( kstp ) ! KPP non-local tracer fluxes 71 #endif 67 IF( .NOT. lk_offline .AND. lk_zdfkpp ) & 68 & CALL trc_kpp( kstp ) ! KPP non-local tracer fluxes 72 69 #if defined key_agrif 73 70 IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc ! tracers sponge … … 81 78 ELSE ! 1D vertical configuration 82 79 CALL trc_sbc( kstp ) ! surface boundary condition 83 #if ! defined key_offline 84 IF( lk_zdfkpp ) CALL trc_kpp( kstp ) ! KPP non-local tracer fluxes 85 #endif 80 IF( .NOT. lk_offline .AND. lk_zdfkpp ) & 81 & CALL trc_kpp( kstp ) ! KPP non-local tracer fluxes 86 82 CALL trc_zdf( kstp ) ! vertical mixing and after tracer fields 87 83 CALL trc_nxt( kstp ) ! tracer fields at next time step -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/TRP/trczdf.F90
r2476 r2517 65 65 #if ! defined key_pisces 66 66 IF( neuler == 0 .AND. kt == nit000 ) THEN ! at nit000 67 r2dt(:) = rdttr a(:) * FLOAT(nn_dttrc) ! = rdtra(restarting with Euler time stepping)67 r2dt(:) = rdttrc(:) ! = rdttrc (restarting with Euler time stepping) 68 68 ELSEIF( kt <= nit000 + nn_dttrc ) THEN ! at nit000 or nit000+1 69 r2dt(:) = 2. * rdttr a(:) * FLOAT(nn_dttrc) ! = 2 rdttra(leapfrog)69 r2dt(:) = 2. * rdttrc(:) ! = 2 rdttrc (leapfrog) 70 70 ENDIF 71 71 #else 72 r2dt(:) = rdttr a(:) * FLOAT(nn_dttrc) ! = rdtra (restarting withEuler time stepping)72 r2dt(:) = rdttrc(:) ! = rdttrc (for PISCES use Euler time stepping) 73 73 #endif 74 74 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/trc.F90
r2287 r2517 61 61 !! -------------------------------------------------- 62 62 INTEGER , PUBLIC :: nn_writetrc !: time step frequency for concentration outputs (namelist) 63 REAL(wp), PUBLIC, DIMENSION(jpk) :: rdttrc !: vertical profile of passive tracer time step 63 64 64 65 # if defined key_diatrc && ! defined key_iomput -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/trcdia.F90
r2420 r2517 101 101 LOGICAL :: ll_print = .FALSE. 102 102 CHARACTER (len=40) :: clhstnam, clop 103 #if defined key_offline104 103 INTEGER :: inum = 11 ! temporary logical unit 105 #endif106 104 CHARACTER (len=20) :: cltra, cltrau 107 105 CHARACTER (len=80) :: cltral … … 159 157 & ' limit storage in depth = ', ipk 160 158 161 #if defined key_offline 162 ! WRITE root name in date.file for use by postpro 163 IF(lwp) THEN 159 IF( lk_offline .AND. lwp ) THEN 164 160 CALL dia_nam( clhstnam, nn_writetrc,' ' ) 165 161 CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', 1, numout, lwp, narea ) … … 167 163 CLOSE(inum) 168 164 ENDIF 169 #endif170 165 171 166 ! Define the NETCDF files for passive tracer concentration -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/trcini.F90
r2457 r2517 118 118 ENDIF 119 119 120 IF( .NOT. ln_rsttr ) THEN 121 #if defined key_offline 122 CALL day_init ! calendar 123 #endif 124 # if defined key_dtatrc 125 ! Initialization of tracer from a file that may also be used for damping 126 CALL trc_dta( nit000 ) 127 DO jn = 1, jptra 128 IF( lutini(jn) ) trn(:,:,:,jn) = trdta(:,:,:,jn) * tmask(:,:,:) ! initialisation from file if required 129 END DO 130 # endif 131 trb(:,:,:,:) = trn(:,:,:,:) 120 IF( ln_rsttr ) THEN 121 ! 122 IF( lk_offline ) neuler = 1 ! Set time-step indicator at nit000 (leap-frog) 123 CALL trc_rst_read ! restart from a file 124 ! 132 125 ELSE 133 ! 134 CALL trc_rst_read ! restart from a file 135 ! 126 IF( lk_offline ) THEN 127 neuler = 0 ! Set time-step indicator at nit000 (euler) 128 CALL day_init ! set calendar 129 ENDIF 130 IF( lk_dtatrc ) THEN 131 CALL trc_dta( nit000 ) ! Initialization of tracer from a file that may also be used for damping 132 DO jn = 1, jptra 133 IF( lutini(jn) ) trn(:,:,:,jn) = trdta(:,:,:,jn) * tmask(:,:,:) ! initialisation from file if required 134 END DO 135 ENDIF 136 trb(:,:,:,:) = trn(:,:,:,:) 137 ! 136 138 ENDIF 137 139 138 140 tra(:,:,:,:) = 0. 139 141 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
r2287 r2517 129 129 ENDIF 130 130 131 rdttrc(:) = rdttra(:) * FLOAT( nn_dttrc ) ! vertical profile of passive tracer time-step 132 133 IF(lwp) WRITE(numout,*) 134 IF(lwp) WRITE(numout,*) ' Passive Tracer time step rdttrc = ', rdttrc(1) 135 IF(lwp) WRITE(numout,*) 136 131 137 #if defined key_trdmld_trc || defined key_trdtrc 132 138 nn_trd_trc = 20 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/trcrst.F90
r2457 r2517 34 34 USE trcrst_c14b ! C14 bomb restart 35 35 USE trcrst_my_trc ! MY_TRC restart 36 #if defined key_offline 37 USE daymod 38 #endif 36 USE daymod 39 37 IMPLICIT NONE 40 38 PRIVATE … … 63 61 !!---------------------------------------------------------------------- 64 62 ! 65 # if ! defined key_offline 66 IF( kt == nit000 ) lrst_trc = .FALSE. 67 # else 68 IF( kt == nit000 ) THEN 69 lrst_trc = .FALSE. 70 nitrst = nitend 71 ENDIF 72 73 IF( MOD( kt - 1, nstock ) == 0 ) THEN 74 ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment 75 nitrst = kt + nstock - 1 ! define the next value of nitrst for restart writing 76 IF( nitrst > nitend ) nitrst = nitend ! make sure we write a restart at the end of the run 77 ENDIF 78 # endif 79 ! to get better performances with NetCDF format: 80 ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*nn_dttrc + 1) 81 ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*nn_dttrc + 1 82 IF( kt == nitrst - 2*nn_dttrc + 1 .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc + 1 .AND. .NOT. lrst_trc ) ) THEN 63 IF( lk_offline ) THEN 64 IF( kt == nit000 ) THEN 65 lrst_trc = .FALSE. 66 nitrst = nitend 67 ENDIF 68 69 IF( MOD( kt - 1, nstock ) == 0 ) THEN 70 ! we use kt - 1 and not kt - nit000 to keep the same periodicity from the beginning of the experiment 71 nitrst = kt + nstock - 1 ! define the next value of nitrst for restart writing 72 IF( nitrst > nitend ) nitrst = nitend ! make sure we write a restart at the end of the run 73 ENDIF 74 ELSE 75 IF( kt == nit000 ) lrst_trc = .FALSE. 76 ENDIF 77 78 ! to get better performances with NetCDF format: 79 ! we open and define the tracer restart file one tracer time step before writing the data (-> at nitrst - 2*nn_dttrc + 1) 80 ! except if we write tracer restart files every tracer time step or if a tracer restart file was writen at nitend - 2*nn_dttrc + 1 81 IF( kt == nitrst - 2*nn_dttrc + 1 .OR. nstock == nn_dttrc .OR. ( kt == nitend - nn_dttrc + 1 .AND. .NOT. lrst_trc ) ) THEN 83 82 ! beware of the format used to write kt (default is i8.8, that should be large enough) 84 83 IF( nitrst > 1.0e9 ) THEN ; WRITE(clkt,* ) nitrst … … 102 101 !!---------------------------------------------------------------------- 103 102 INTEGER :: jn 104 INTEGER :: iarak0105 REAL(wp) :: zarak0106 103 INTEGER :: jlibalt = jprstlib 107 104 LOGICAL :: llok … … 126 123 CALL trc_rst_cal( nit000, 'READ' ) ! calendar 127 124 128 IF( ln_trcadv_cen2 .OR. ln_trcadv_tvd ) THEN ; iarak0 = 1129 ELSE ; iarak0 = 0130 ENDIF131 CALL iom_get( numrtr, 'arak0', zarak0 )132 133 IF( iarak0 /= NINT( zarak0 ) ) & ! Control of the scheme134 & CALL ctl_stop( ' ===>>>> : problem with advection scheme', &135 & ' it must be the same type for both restart and previous run', &136 & ' centered or euler ' )137 IF(lwp) WRITE(numout,*)138 IF(lwp) WRITE(numout,*) ' arakawa option : ', NINT( zarak0 )139 140 125 ! READ prognostic variables and computes diagnostic variable 141 126 DO jn = 1, jptra … … 171 156 172 157 CALL trc_rst_cal( kt, 'WRITE' ) ! calendar 173 174 IF( ln_trcadv_cen2 .OR. ln_trcadv_tvd ) THEN ; zarak0 = 1. 175 ELSE ; zarak0 = 0. 176 ENDIF 177 CALL iom_rstput( kt, nitrst, numrtw, 'arak0', zarak0 ) 178 158 CALL iom_rstput( kt, nitrst, numrtw, 'rdttrc1', rdttrc(1) ) ! surface passive tracer time step 179 159 ! prognostic variables 180 160 ! -------------------- … … 232 212 CHARACTER(len=*), INTENT(in) :: cdrw ! "READ"/"WRITE" flag 233 213 ! 234 REAL(wp) :: zkt 235 #if defined key_offline 214 REAL(wp) :: zkt, zrdttrc1 236 215 REAL(wp) :: zndastp 237 #endif238 216 239 217 ! Time domain : restart … … 257 235 & CALL ctl_stop( ' ===>>>> : problem with nit000 for the restart', & 258 236 & ' verify the restart file or rerun with nn_rsttr = 0 (namelist)' ) 259 #if defined key_offline 260 ! define ndastp and adatrj 261 IF ( nn_rsttr == 2 ) THEN 262 CALL iom_get( numrtr, 'ndastp', zndastp ) 263 ndastp = NINT( zndastp ) 264 CALL iom_get( numrtr, 'adatrj', adatrj ) 265 ELSE 266 ndastp = ndate0 - 1 ! ndate0 read in the namelist in dom_nam 267 adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 268 ! note this is wrong if time step has changed during run 237 IF( lk_offline ) THEN ! set the date in offline mode 238 ! Check dynamics and tracer time-step consistency and force Euler restart if changed 239 IF( iom_varid( numrtr, 'rdttrc1', ldstop = .FALSE. ) > 0 ) THEN 240 CALL iom_get( numrtr, 'rdttrc1', zrdttrc1 ) 241 IF( zrdttrc1 /= rdttrc(1) ) neuler = 0 242 ENDIF 243 ! ! define ndastp and adatrj 244 IF ( nn_rsttr == 2 ) THEN 245 CALL iom_get( numrtr, 'ndastp', zndastp ) 246 ndastp = NINT( zndastp ) 247 CALL iom_get( numrtr, 'adatrj', adatrj ) 248 ELSE 249 ndastp = ndate0 - 1 ! ndate0 read in the namelist in dom_nam 250 adatrj = ( REAL( nit000-1, wp ) * rdttra(1) ) / rday 251 ! note this is wrong if time step has changed during run 252 ENDIF 253 ! 254 IF(lwp) THEN 255 WRITE(numout,*) ' *** Info used values : ' 256 WRITE(numout,*) ' date ndastp : ', ndastp 257 WRITE(numout,*) ' number of elapsed days since the begining of run : ', adatrj 258 WRITE(numout,*) 259 ENDIF 260 ! 261 CALL day_init ! compute calendar 262 ! 269 263 ENDIF 270 264 ! 271 IF(lwp) THEN272 WRITE(numout,*) ' *** Info used values : '273 WRITE(numout,*) ' date ndastp : ', ndastp274 WRITE(numout,*) ' number of elapsed days since the begining of run : ', adatrj275 WRITE(numout,*)276 ENDIF277 !278 CALL day_init ! compute calendar279 !280 #endif281 282 265 ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN 283 266 ! … … 287 270 IF(lwp) WRITE(numout,*) '~~~~~~~' 288 271 ENDIF 289 ! calendar control290 272 CALL iom_rstput( kt, nitrst, numrtw, 'kt' , REAL( kt , wp) ) ! time-step 291 273 CALL iom_rstput( kt, nitrst, numrtw, 'ndastp' , REAL( ndastp, wp) ) ! date … … 304 286 !!---------------------------------------------------------------------- 305 287 306 INTEGER :: j i, jj, jk, jn288 INTEGER :: jn 307 289 REAL(wp) :: zdiag_var, zdiag_varmin, zdiag_varmax, zdiag_tot 308 REAL(wp) :: zder , zvol290 REAL(wp) :: zder 309 291 !!---------------------------------------------------------------------- 310 292 -
branches/nemo_v3_3_beta/NEMOGCM/NEMO/TOP_SRC/trcwri.F90
r2287 r2517 16 16 USE trc 17 17 USE iom 18 #if defined key_offline19 USE oce_trc20 18 USE dianam 21 #endif22 19 23 20 IMPLICIT NONE … … 56 53 INTEGER :: jn 57 54 CHARACTER (len=20) :: cltra 58 #if defined key_offline59 55 CHARACTER (len=40) :: clhstnam 60 56 INTEGER :: inum = 11 ! temporary logical unit 61 #endif62 57 !!--------------------------------------------------------------------- 63 58 64 #if defined key_offline 65 IF( kt == nit000 ) THEN 66 ! WRITE root name in date.file for use by postpro 67 IF(lwp) THEN 68 CALL dia_nam( clhstnam, nn_writetrc,' ' ) 69 CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 70 WRITE(inum,*) clhstnam 71 CLOSE(inum) 72 ENDIF 59 IF( lk_offline .AND. kt == nit000 .AND. lwp ) THEN ! WRITE root name in date.file for use by postpro 60 CALL dia_nam( clhstnam, nn_writetrc,' ' ) 61 CALL ctl_opn( inum, 'date.file', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 62 WRITE(inum,*) clhstnam 63 CLOSE(inum) 73 64 ENDIF 74 #endif75 65 ! write the tracer concentrations in the file 76 66 ! ---------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.