Changeset 15213
- Timestamp:
- 2021-08-31T14:58:22+02:00 (19 months ago)
- Location:
- branches/UKMO/dev_1d_bugfixes_tocommit/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_1d_bugfixes_tocommit/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90
r10302 r15213 10 10 !!---------------------------------------------------------------------- 11 11 !! 'key_c1d' 1D Configuration 12 !!---------------------------------------------------------------------- 12 !!---------------------------------------------------------------------- 13 13 !! stp_c1d : NEMO system time-stepping in c1d case 14 14 !!---------------------------------------------------------------------- 15 USE step_oce ! time stepping definition modules 15 USE step_oce ! time stepping definition modules 16 16 #if defined key_top 17 17 USE trcstp ! passive tracer time-stepping (trc_stp routine) … … 20 20 USE dynnxt_c1d ! time-stepping (dyn_nxt routine) 21 21 USE dyndmp ! U & V momentum damping (dyn_dmp routine) 22 USE restart ! restart 22 USE restart ! restart 23 23 24 24 IMPLICIT NONE … … 40 40 !!---------------------------------------------------------------------- 41 41 !! *** ROUTINE stp_c1d *** 42 !! 42 !! 43 43 !! ** Purpose : - Time stepping of SBC including LIM (dynamic and thermodynamic eqs.) 44 44 !! - Time stepping of OPA (momentum and active tracer eqs.) 45 45 !! - Time stepping of TOP (passive tracer eqs.) 46 !! 47 !! ** Method : -1- Update forcings and data 48 !! -2- Update vertical ocean physics 49 !! -3- Compute the t and s trends 50 !! -4- Update t and s 46 !! 47 !! ** Method : -1- Update forcings and data 48 !! -2- Update vertical ocean physics 49 !! -3- Compute the t and s trends 50 !! -4- Update t and s 51 51 !! -5- Compute the momentum trends 52 52 !! -6- Update the horizontal velocity … … 76 76 CALL bn2( tsb, rab_b, rn2b ) ! before Brunt-Vaisala frequency 77 77 CALL bn2( tsn, rab_n, rn2 ) ! now Brunt-Vaisala frequency 78 ! VERTICAL PHYSICS 78 ! VERTICAL PHYSICS 79 79 CALL zdf_bfr( kstp ) ! bottom friction 80 80 ! ! Vertical eddy viscosity and diffusivity coefficients … … 98 98 IF( lk_zdfddm .AND. .NOT. lk_zdfkpp ) & 99 99 & CALL zdf_ddm( kstp ) ! double diffusive mixing 100 100 101 101 CALL zdf_mxl( kstp ) ! mixed layer depth 102 102 … … 125 125 tsa(:,:,:,:) = 0._wp ! set tracer trends to zero 126 126 127 IF( lk_asminc .AND. ln_asmiau .AND. ln_trainc ) & 128 CALL tra_asm_inc( kstp ) ! apply tracer assimilation increment 127 129 CALL tra_sbc( kstp ) ! surface boundary condition 128 130 IF( ln_traqsr ) CALL tra_qsr( kstp ) ! penetrative solar radiation qsr … … 141 143 ua(:,:,:) = 0._wp ! set dynamics trends to zero 142 144 va(:,:,:) = 0._wp 145 146 IF( ln_bkgwri ) CALL asm_bkg_wri( kstp ) ! output background fields 143 147 144 148 IF( ln_dyndmp ) CALL dyn_dmp ( kstp ) ! internal damping trends- momentum -
branches/UKMO/dev_1d_bugfixes_tocommit/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r11442 r15213 29 29 !! 3.3.1! 2011-01 (A. R. Porter, STFC Daresbury) dynamical allocation 30 30 !! 3.4 ! 2011-11 (C. Harris) decomposition changes for running with CICE 31 !! ! 2012-05 (C. Calone, J. Simeon, G. Madec, C. Ethe) Add grid coarsening 31 !! ! 2012-05 (C. Calone, J. Simeon, G. Madec, C. Ethe) Add grid coarsening 32 32 !!---------------------------------------------------------------------- 33 33 … … 59 59 USE phycst ! physical constant (par_cst routine) 60 60 USE trdini ! dyn/tra trends initialization (trd_init routine) 61 USE asminc ! assimilation increments 61 USE asminc ! assimilation increments 62 62 USE asmbkg ! writing out state trajectory 63 63 USE asmbgc ! biogeochemical assimilation increments … … 69 69 USE icbini ! handle bergs, initialisation 70 70 USE icbstp ! handle bergs, calving, themodynamics and transport 71 USE sbccpl 71 USE sbccpl 72 72 USE cpl_oasis3 ! OASIS3 coupling 73 73 USE c1d ! 1D configuration … … 84 84 USE sbctide, ONLY: lk_tide 85 85 USE crsini ! initialise grid coarsening utility 86 USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 86 USE lbcnfd, ONLY: isendto, nsndto, nfsloop, nfeloop ! Setup of north fold exchanges 87 87 USE sbc_oce, ONLY: lk_oasis 88 88 USE stopack … … 132 132 #if defined key_agrif 133 133 CALL Agrif_Declare_Var_dom ! AGRIF: set the meshes for DOM 134 CALL Agrif_Declare_Var ! " " " " " DYN/TRA 134 CALL Agrif_Declare_Var ! " " " " " DYN/TRA 135 135 # if defined key_top 136 136 CALL Agrif_Declare_Var_top ! " " " " " TOP … … 150 150 ! !-----------------------! 151 151 istp = nit000 152 153 IF( lk_asminc ) THEN 154 IF( ln_bkgwri ) CALL asm_bkg_wri( nit000 - 1 ) ! Output background fields 155 IF( ln_asmdin ) THEN ! Direct initialization 156 IF( ln_trainc ) CALL tra_asm_inc( nit000 - 1 ) ! Tracers 157 IF( ln_dyninc ) CALL dyn_asm_inc( nit000 - 1 ) ! Dynamics 158 IF( ln_sshinc ) CALL ssh_asm_inc( nit000 - 1 ) ! SSH 159 IF( lk_bgcinc ) CALL bgc_asm_inc( nit000 - 1 ) ! BGC 160 ENDIF 161 ENDIF 162 152 163 #if defined key_c1d 153 154 155 156 164 DO WHILE ( istp <= nitend .AND. nstop == 0 ) 165 CALL stp_c1d( istp ) 166 istp = istp + 1 167 END DO 157 168 #else 158 IF( lk_asminc ) THEN159 IF( ln_bkgwri ) CALL asm_bkg_wri( nit000 - 1 ) ! Output background fields160 IF( ln_asmdin ) THEN ! Direct initialization161 IF( ln_trainc ) CALL tra_asm_inc( nit000 - 1 ) ! Tracers162 IF( ln_dyninc ) CALL dyn_asm_inc( nit000 - 1 ) ! Dynamics163 IF( ln_sshinc ) CALL ssh_asm_inc( nit000 - 1 ) ! SSH164 IF( lk_bgcinc ) CALL bgc_asm_inc( nit000 - 1 ) ! BGC165 ENDIF166 ENDIF167 169 168 170 #if defined key_agrif 169 170 #endif 171 172 171 CALL Agrif_Regrid() 172 #endif 173 174 DO WHILE ( istp <= nitend .AND. nstop == 0 ) 173 175 #if defined key_agrif 174 176 CALL stp ! AGRIF: time stepping 175 177 #else 176 177 CALL stp( istp )178 IF (lk_oasis) CALL sbc_cpl_snd( istp ) ! Coupling to atmos 179 CALL stp( istp ) 178 180 ! We don't couple on the final timestep because 179 181 ! our restart file has already been written … … 186 188 ! sbc_cpl_snd call prior to the main DO loop 187 189 ! This solution produces identical results 188 ! with fewer lines of code. 189 #endif 190 191 192 190 ! with fewer lines of code. 191 #endif 192 istp = istp + 1 193 IF( lk_mpp ) CALL mpp_max( nstop ) 194 END DO 193 195 #endif 194 196 … … 225 227 IF( lk_oasis ) CALL cpl_finalize ! end coupling and mpp communications with OASIS 226 228 #else 227 IF( lk_oasis ) THEN 229 IF( lk_oasis ) THEN 228 230 CALL cpl_finalize ! end coupling and mpp communications with OASIS 229 231 ELSE … … 233 235 ! 234 236 ! Met Office addition: if failed, return non-zero exit code 235 IF( nstop /= 0 ) CALL exit( 9 ) 237 IF( nstop /= 0 ) CALL exit( 9 ) 236 238 ! 237 239 END SUBROUTINE nemo_gcm … … 278 280 REWIND( numnam_cfg ) ! Namelist namcfg in confguration namelist : Control prints & Benchmark 279 281 READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 280 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. ) 282 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. ) 281 283 282 284 ! Force values for AGRIF zoom (cf. agrif_user.F90) … … 357 359 #if defined key_nemocice_decomp 358 360 jpi = ( nx_global+2-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 359 jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 361 jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 360 362 #else 361 363 jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 362 364 jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 363 365 #endif 364 ENDIF 366 ENDIF 365 367 jpk = jpkdta ! third dim 366 368 #if defined key_agrif 367 369 ! simple trick to use same vertical grid as parent 368 ! but different number of levels: 370 ! but different number of levels: 369 371 ! Save maximum number of levels in jpkdta, then define all vertical grids 370 372 ! with this number. … … 435 437 436 438 CALL dyn_nept_init ! simplified form of Neptune effect 437 ! 439 ! 438 440 IF( ln_crs ) CALL crs_init ! Domain initialization of coarsened grid 439 441 ! … … 477 479 CALL sto_par_init ! Stochastic parametrization 478 480 IF( ln_sto_eos ) CALL sto_pts_init ! RRandom T/S fluctuations 479 481 480 482 #if defined key_top 481 483 ! ! Passive tracers … … 498 500 CALL bias_init ! Pressure correction bias 499 501 IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler 500 502 501 503 IF (nstop > 0) THEN 502 504 CALL CTL_STOP('STOP','Critical errors in NEMO initialisation') … … 557 559 WRITE(numout,*) ' left bottom i index of the zoom (in data domain) jpizoom = ', jpizoom 558 560 WRITE(numout,*) ' left bottom j index of the zoom (in data domain) jpizoom = ', jpjzoom 559 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 561 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 560 562 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 561 563 ENDIF … … 639 641 IF( numdct_salt /= -1 ) CLOSE( numdct_salt ) ! salt transports 640 642 #if defined key_top 641 IF( numstr /= -1 ) CLOSE( numstr ) ! tracer statistics 643 IF( numstr /= -1 ) CLOSE( numstr ) ! tracer statistics 642 644 #endif 643 645 ! … … 661 663 USE ldftra_oce, ONLY: ldftra_oce_alloc 662 664 USE trc_oce , ONLY: trc_oce_alloc 663 #if defined key_diadct 664 USE diadct , ONLY: diadct_alloc 665 #endif 665 #if defined key_diadct 666 USE diadct , ONLY: diadct_alloc 667 #endif 666 668 #if defined key_bdy 667 669 USE bdy_oce , ONLY: bdy_oce_alloc … … 681 683 ierr = ierr + trc_oce_alloc () ! shared TRC / TRA arrays 682 684 ! 683 #if defined key_diadct 684 ierr = ierr + diadct_alloc () ! 685 #endif 685 #if defined key_diadct 686 ierr = ierr + diadct_alloc () ! 687 #endif 686 688 #if defined key_bdy 687 689 ierr = ierr + bdy_oce_alloc () ! bdy masks (incl. initialization) … … 813 815 !!====================================================================== 814 816 !! *** ROUTINE nemo_northcomms *** 815 !! nemo_northcomms : Setup for north fold exchanges with explicit 817 !! nemo_northcomms : Setup for north fold exchanges with explicit 816 818 !! point-to-point messaging 817 819 !!===================================================================== … … 821 823 !!---------------------------------------------------------------------- 822 824 !! 1.0 ! 2011-10 (A. C. Coward, NOCS & J. Donners, PRACE) 823 !! 2.0 ! 2013-06 Setup avoiding MPI communication (I. Epicoco, S. Mocavero, CMCC) 825 !! 2.0 ! 2013-06 Setup avoiding MPI communication (I. Epicoco, S. Mocavero, CMCC) 824 826 !!---------------------------------------------------------------------- 825 827 … … 828 830 829 831 njmppmax = MAXVAL( njmppt ) 830 832 831 833 !initializes the north-fold communication variables 832 834 isendto(:) = 0 … … 844 846 !loop over the other north-fold processes to find the processes 845 847 !managing the points belonging to the sxT-dxT range 846 848 847 849 DO jn = 1, jpni 848 850 !sxT is the first point (in the global domain) of the jn … … 887 889 !!====================================================================== 888 890 END MODULE nemogcm 889 890
Note: See TracChangeset
for help on using the changeset viewer.