Changeset 15280 for branches/UKMO/dev_r5518_GO6_package_FOAMv14
- Timestamp:
- 2021-09-23T16:07:03+02:00 (3 years ago)
- Location:
- branches/UKMO/dev_r5518_GO6_package_FOAMv14/NEMOGCM/NEMO/OPA_SRC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_GO6_package_FOAMv14/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90
r10302 r15280 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_r5518_GO6_package_FOAMv14/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r11442 r15280 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 152 153 #if defined key_c1d 153 DO WHILE ( istp <= nitend .AND. nstop == 0 ) 154 CALL stp_c1d( istp ) 155 istp = istp + 1 156 END DO 154 155 IF( lk_asminc ) THEN 156 IF( ln_bkgwri ) CALL asm_bkg_wri( nit000 - 1 ) ! Output background fields 157 IF( ln_asmdin ) THEN ! Direct initialization 158 IF( ln_trainc ) CALL tra_asm_inc( nit000 - 1 ) ! Tracers 159 ENDIF 160 ENDIF 161 162 DO WHILE ( istp <= nitend .AND. nstop == 0 ) 163 CALL stp_c1d( istp ) 164 istp = istp + 1 165 END DO 157 166 #else 158 IF( lk_asminc ) THEN 159 IF( ln_bkgwri ) CALL asm_bkg_wri( nit000 - 1 ) ! Output background fields 160 IF( ln_asmdin ) THEN ! Direct initialization 161 IF( ln_trainc ) CALL tra_asm_inc( nit000 - 1 ) ! Tracers 162 IF( ln_dyninc ) CALL dyn_asm_inc( nit000 - 1 ) ! Dynamics 163 IF( ln_sshinc ) CALL ssh_asm_inc( nit000 - 1 ) ! SSH 164 IF( lk_bgcinc ) CALL bgc_asm_inc( nit000 - 1 ) ! BGC 165 ENDIF 166 ENDIF 167 168 IF( lk_asminc ) THEN 169 IF( ln_bkgwri ) CALL asm_bkg_wri( nit000 - 1 ) ! Output background fields 170 IF( ln_asmdin ) THEN ! Direct initialization 171 IF( ln_trainc ) CALL tra_asm_inc( nit000 - 1 ) ! Tracers 172 IF( ln_dyninc ) CALL dyn_asm_inc( nit000 - 1 ) ! Dynamics 173 IF( ln_sshinc ) CALL ssh_asm_inc( nit000 - 1 ) ! SSH 174 IF( lk_bgcinc ) CALL bgc_asm_inc( nit000 - 1 ) ! BGC 175 ENDIF 176 ENDIF 167 177 168 178 #if defined key_agrif 169 170 #endif 171 172 179 CALL Agrif_Regrid() 180 #endif 181 182 DO WHILE ( istp <= nitend .AND. nstop == 0 ) 173 183 #if defined key_agrif 174 184 CALL stp ! AGRIF: time stepping 175 185 #else 176 177 CALL stp( istp )186 IF (lk_oasis) CALL sbc_cpl_snd( istp ) ! Coupling to atmos 187 CALL stp( istp ) 178 188 ! We don't couple on the final timestep because 179 189 ! our restart file has already been written … … 186 196 ! sbc_cpl_snd call prior to the main DO loop 187 197 ! This solution produces identical results 188 ! with fewer lines of code. 189 #endif 190 191 192 198 ! with fewer lines of code. 199 #endif 200 istp = istp + 1 201 IF( lk_mpp ) CALL mpp_max( nstop ) 202 END DO 193 203 #endif 194 204 … … 225 235 IF( lk_oasis ) CALL cpl_finalize ! end coupling and mpp communications with OASIS 226 236 #else 227 IF( lk_oasis ) THEN 237 IF( lk_oasis ) THEN 228 238 CALL cpl_finalize ! end coupling and mpp communications with OASIS 229 239 ELSE … … 233 243 ! 234 244 ! Met Office addition: if failed, return non-zero exit code 235 IF( nstop /= 0 ) CALL exit( 9 ) 245 IF( nstop /= 0 ) CALL exit( 9 ) 236 246 ! 237 247 END SUBROUTINE nemo_gcm … … 278 288 REWIND( numnam_cfg ) ! Namelist namcfg in confguration namelist : Control prints & Benchmark 279 289 READ ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 ) 280 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. ) 290 904 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. ) 281 291 282 292 ! Force values for AGRIF zoom (cf. agrif_user.F90) … … 357 367 #if defined key_nemocice_decomp 358 368 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. 369 jpj = ( ny_global+2-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 360 370 #else 361 371 jpi = ( jpiglo-2*jpreci + (jpni-1) ) / jpni + 2*jpreci ! first dim. 362 372 jpj = ( jpjglo-2*jprecj + (jpnj-1) ) / jpnj + 2*jprecj ! second dim. 363 373 #endif 364 ENDIF 374 ENDIF 365 375 jpk = jpkdta ! third dim 366 376 #if defined key_agrif 367 377 ! simple trick to use same vertical grid as parent 368 ! but different number of levels: 378 ! but different number of levels: 369 379 ! Save maximum number of levels in jpkdta, then define all vertical grids 370 380 ! with this number. … … 435 445 436 446 CALL dyn_nept_init ! simplified form of Neptune effect 437 ! 447 ! 438 448 IF( ln_crs ) CALL crs_init ! Domain initialization of coarsened grid 439 449 ! … … 477 487 CALL sto_par_init ! Stochastic parametrization 478 488 IF( ln_sto_eos ) CALL sto_pts_init ! RRandom T/S fluctuations 479 489 480 490 #if defined key_top 481 491 ! ! Passive tracers … … 498 508 CALL bias_init ! Pressure correction bias 499 509 IF(lwp) WRITE(numout,*) 'Euler time step switch is ', neuler 500 510 501 511 IF (nstop > 0) THEN 502 512 CALL CTL_STOP('STOP','Critical errors in NEMO initialisation') … … 557 567 WRITE(numout,*) ' left bottom i index of the zoom (in data domain) jpizoom = ', jpizoom 558 568 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 569 WRITE(numout,*) ' lateral cond. type (between 0 and 6) jperio = ', jperio 560 570 WRITE(numout,*) ' use file attribute if exists as i/p j-start ln_use_jattr = ', ln_use_jattr 561 571 ENDIF … … 639 649 IF( numdct_salt /= -1 ) CLOSE( numdct_salt ) ! salt transports 640 650 #if defined key_top 641 IF( numstr /= -1 ) CLOSE( numstr ) ! tracer statistics 651 IF( numstr /= -1 ) CLOSE( numstr ) ! tracer statistics 642 652 #endif 643 653 ! … … 661 671 USE ldftra_oce, ONLY: ldftra_oce_alloc 662 672 USE trc_oce , ONLY: trc_oce_alloc 663 #if defined key_diadct 664 USE diadct , ONLY: diadct_alloc 665 #endif 673 #if defined key_diadct 674 USE diadct , ONLY: diadct_alloc 675 #endif 666 676 #if defined key_bdy 667 677 USE bdy_oce , ONLY: bdy_oce_alloc … … 681 691 ierr = ierr + trc_oce_alloc () ! shared TRC / TRA arrays 682 692 ! 683 #if defined key_diadct 684 ierr = ierr + diadct_alloc () ! 685 #endif 693 #if defined key_diadct 694 ierr = ierr + diadct_alloc () ! 695 #endif 686 696 #if defined key_bdy 687 697 ierr = ierr + bdy_oce_alloc () ! bdy masks (incl. initialization) … … 813 823 !!====================================================================== 814 824 !! *** ROUTINE nemo_northcomms *** 815 !! nemo_northcomms : Setup for north fold exchanges with explicit 825 !! nemo_northcomms : Setup for north fold exchanges with explicit 816 826 !! point-to-point messaging 817 827 !!===================================================================== … … 821 831 !!---------------------------------------------------------------------- 822 832 !! 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) 833 !! 2.0 ! 2013-06 Setup avoiding MPI communication (I. Epicoco, S. Mocavero, CMCC) 824 834 !!---------------------------------------------------------------------- 825 835 … … 828 838 829 839 njmppmax = MAXVAL( njmppt ) 830 840 831 841 !initializes the north-fold communication variables 832 842 isendto(:) = 0 … … 844 854 !loop over the other north-fold processes to find the processes 845 855 !managing the points belonging to the sxT-dxT range 846 856 847 857 DO jn = 1, jpni 848 858 !sxT is the first point (in the global domain) of the jn … … 887 897 !!====================================================================== 888 898 END MODULE nemogcm 889 890
Note: See TracChangeset
for help on using the changeset viewer.