- Timestamp:
- 2020-11-26T15:24:38+01:00 (4 years ago)
- Location:
- NEMO/branches/2020/dev_r13541_TOP-01_rlod_Antarctic_ice_Sheet_Fe_Source
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r13541_TOP-01_rlod_Antarctic_ice_Sheet_Fe_Source
- Property svn:externals
-
old new 8 8 9 9 # SETTE 10 ^/utils/CI/sette@135 07sette10 ^/utils/CI/sette@13559 sette
-
- Property svn:externals
-
NEMO/branches/2020/dev_r13541_TOP-01_rlod_Antarctic_ice_Sheet_Fe_Source/src/SAS/nemogcm.F90
r13538 r13886 2 2 !!====================================================================== 3 3 !! *** MODULE nemogcm *** 4 !! StandAlone Surface module : surface fluxes + sea-ice + iceberg floats 4 !! StandAlone Surface module : surface fluxes + sea-ice + iceberg floats + ABL 5 5 !!====================================================================== 6 6 !! History : 3.6 ! 2011-11 (S. Alderson, G. Madec) original code … … 58 58 59 59 #if defined key_mpp_mpi 60 ! need MPI_Wtime 60 61 INCLUDE 'mpif.h' 61 62 #endif … … 83 84 !!---------------------------------------------------------------------- 84 85 INTEGER :: istp ! time step index 86 REAL(wp):: zstptiming ! elapsed time for 1 time step 85 87 !!---------------------------------------------------------------------- 86 88 ! … … 93 95 #if defined key_agrif 94 96 Kbb_a = Nbb; Kmm_a = Nnn; Krhs_a = Nrhs ! agrif_oce module copies of time level indices 95 CALL Agrif_Declare_Var ! " " " " " DYN/TRA 97 CALL Agrif_Declare_Var ! " " " " " DYN/TRA 96 98 # if defined key_top 97 99 CALL Agrif_Declare_Var_top ! " " " " " TOP … … 107 109 ! !== time stepping ==! 108 110 ! !-----------------------! 111 ! 112 ! !== set the model time-step ==! 113 ! 109 114 istp = nit000 110 115 ! … … 124 129 END DO 125 130 ! 126 # else131 # else 127 132 ! 128 133 IF( .NOT.ln_diurnal_only ) THEN !== Standard time-stepping ==! 129 134 ! 130 135 DO WHILE( istp <= nitend .AND. nstop == 0 ) 131 #if defined key_mpp_mpi 136 132 137 ncom_stp = istp 133 IF ( istp == ( nit000 + 1 ) ) elapsed_time = MPI_Wtime() 134 IF ( istp == nitend ) elapsed_time = MPI_Wtime() - elapsed_time 135 #endif 138 IF( ln_timing ) THEN 139 zstptiming = MPI_Wtime() 140 IF ( istp == ( nit000 + 1 ) ) elapsed_time = zstptiming 141 IF ( istp == nitend ) elapsed_time = zstptiming - elapsed_time 142 ENDIF 143 136 144 CALL stp ( istp ) 137 145 istp = istp + 1 146 147 IF( lwp .AND. ln_timing ) WRITE(numtime,*) 'timing step ', istp-1, ' : ', MPI_Wtime() - zstptiming 148 138 149 END DO 139 150 ! … … 305 316 WRITE(numout,*) " ) ) \) |`\ \) '. \ ( ( " 306 317 WRITE(numout,*) " ( ( \_/ '-._\ ) ) " 307 WRITE(numout,*) " ) ) jgs `( ( "318 WRITE(numout,*) " ) ) jgs ` ( ( " 308 319 WRITE(numout,*) " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ " 309 320 WRITE(numout,*) … … 367 378 & CALL prt_ctl_init ! Print control 368 379 380 IF( ln_rstart ) CALL rst_read_open 369 381 CALL day_init ! model calendar (using both namelist and restart infos) 370 IF( ln_rstart ) CALL rst_read_open 371 382 383 #if defined key_agrif 384 uu(:,:,:,:) = 0.0_wp ; vv(:,:,:,:) = 0.0_wp ; ts(:,:,:,:,:) = 0.0_wp ! needed for interp done at initialization phase 385 #endif 372 386 ! ! external forcing 373 387 CALL sbc_init( Nbb, Nnn, Naa ) ! Forcings : surface module -
NEMO/branches/2020/dev_r13541_TOP-01_rlod_Antarctic_ice_Sheet_Fe_Source/src/SAS/stpctl.F90
r13538 r13886 68 68 REAL(wp) :: zzz ! local real 69 69 REAL(wp), DIMENSION(4) :: zmax, zmaxlocal 70 LOGICAL :: ll_wrtstp, ll_colruns, ll_wrtruns 70 LOGICAL :: ll_wrtstp, ll_colruns, ll_wrtruns, ll_0oce 71 71 LOGICAL, DIMENSION(jpi,jpj) :: llmsk 72 72 CHARACTER(len=20) :: clname … … 98 98 CALL ctl_opn( numrun, clname, 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 99 99 ! ! open run.stat.nc netcdf file, done only by 1st subdomain 100 clname = clname//'.nc'100 clname = TRIM(clname)//'.nc' 101 101 IF( .NOT. Agrif_Root() ) clname = TRIM(Agrif_CFixed())//"_"//TRIM(clname) 102 102 istatus = NF90_CREATE( TRIM(clname), NF90_CLOBBER, nrunid ) … … 124 124 llmsk(:,Nje1: jpj) = .FALSE. 125 125 ! 126 llmsk(Nis0:Nie0,Njs0:Nje0) = tmask(Nis0:Nie0,Njs0:Nje0,1) == 1._wp ! test only the inner domain 127 IF( COUNT( llmsk(:,:) ) > 0 ) THEN ! avoid huge values sent back for land processors... 128 zmax(1) = MAXVAL( vt_i (:,:) , mask = llmsk ) ! max ice thickness 129 zmax(2) = MAXVAL( ABS( u_ice(:,:) ) , mask = llmsk ) ! max ice velocity (zonal only) 130 zmax(3) = MAXVAL( -tm_i (:,:) + rt0, mask = llmsk ) ! min ice temperature (in degC) 131 ELSE 132 IF( ll_colruns ) THEN ! default value: must not be kept when calling mpp_max -> must be as small as possible 133 zmax(1:3) = -HUGE(1._wp) 134 ELSE ! default value: must not give true for any of the tests bellow (-> avoid manipulating HUGE...) 135 zmax(1:3) = 0._wp 136 ENDIF 137 ENDIF 138 zmax(4) = REAL( nstop, wp ) ! stop indicator 126 llmsk(Nis0:Nie0,Njs0:Nje0) = tmask(Nis0:Nie0,Njs0:Nje0,1) == 1._wp ! test only the inner domain 127 ! 128 ll_0oce = .NOT. ANY( llmsk(:,:) ) ! no ocean point in the inner domain? 129 ! 130 zmax(1) = MAXVAL( vt_i (:,:) , mask = llmsk ) ! max ice thickness 131 zmax(2) = MAXVAL( ABS( u_ice(:,:) ) , mask = llmsk ) ! max ice velocity (zonal only) 132 zmax(3) = MAXVAL( -tm_i (:,:) + rt0, mask = llmsk ) ! min ice temperature (in degC) 133 zmax(4) = REAL( nstop, wp ) ! stop indicator 134 ! 139 135 ! !== get global extrema ==! 140 136 ! !== done by all processes if writting run.stat ==! 141 137 IF( ll_colruns ) THEN 142 138 zmaxlocal(:) = zmax(:) 143 CALL mpp_max( "stpctl", zmax ) ! max over the global domain 139 CALL mpp_max( "stpctl", zmax ) ! max over the global domain: ok even of ll_0oce = .true. 144 140 nstop = NINT( zmax(4) ) ! update nstop indicator (now sheared among all local domains) 145 ENDIF 141 ELSE 142 ! if no ocean point: MAXVAL returns -HUGE => we must overwrite this value to avoid error handling bellow. 143 IF( ll_0oce ) zmax(1:3) = 0._wp ! default "valid" values... 144 ENDIF 145 ! 146 zmax(3) = -zmax(3) ! move back from max(-zz) to min(zz) : easier to manage! 147 IF( ll_colruns ) zmaxlocal(3) = -zmaxlocal(3) ! move back from max(-zz) to min(zz) : easier to manage! 148 ! 146 149 ! !== write "run.stat" files ==! 147 150 ! !== done only by 1st subdomain at writting timestep ==! 148 151 IF( ll_wrtruns ) THEN 149 WRITE(numrun,9500) kt, zmax(1), zmax(2), -zmax(3)150 istatus = NF90_PUT_VAR( nrunid, nvarid(1), (/ zmax(1)/), (/kt/), (/1/) )151 istatus = NF90_PUT_VAR( nrunid, nvarid(2), (/ zmax(2)/), (/kt/), (/1/) )152 istatus = NF90_PUT_VAR( nrunid, nvarid(3), (/-zmax(3)/), (/kt/), (/1/) )152 WRITE(numrun,9500) kt, zmax(1), zmax(2), zmax(3) 153 DO ji = 1, 3 154 istatus = NF90_PUT_VAR( nrunid, nvarid(ji), (/zmax(ji)/), (/kt/), (/1/) ) 155 END DO 153 156 IF( kt == nitend ) istatus = NF90_CLOSE(nrunid) 154 157 END IF … … 158 161 IF( zmax(1) > 100._wp .OR. & ! too large ice thickness maximum ( > 100 m) 159 162 & zmax(2) > 10._wp .OR. & ! too large ice velocity ( > 10 m/s) 160 & zmax(3) >101._wp .OR. & ! too cold ice temperature ( < -100 degC)163 & zmax(3) < -101._wp .OR. & ! too cold ice temperature ( < -100 degC) 161 164 & ISNAN( zmax(1) + zmax(2) + zmax(3) ) .OR. & ! NaN encounter in the tests 162 165 & ABS( zmax(1) + zmax(2) + zmax(3) ) > HUGE(1._wp) ) THEN ! Infinity encounter in the tests … … 192 195 ! 193 196 WRITE(ctmp1,*) ' stp_ctl: ice_thick > 100 m or |ice_vel| > 10 m/s or ice_temp < -100 degC or NaN encounter in the tests' 194 CALL wrt_line( ctmp2, kt, 'ice_thick max', 195 CALL wrt_line( ctmp3, kt, '|ice_vel| max', 196 CALL wrt_line( ctmp4, kt, 'ice_temp min', -zmax(3), iloc(:,3), iareasum(3), iareamin(3), iareamax(3) )197 CALL wrt_line( ctmp2, kt, 'ice_thick max', zmax(1), iloc(:,1), iareasum(1), iareamin(1), iareamax(1) ) 198 CALL wrt_line( ctmp3, kt, '|ice_vel| max', zmax(2), iloc(:,2), iareasum(2), iareamin(2), iareamax(2) ) 199 CALL wrt_line( ctmp4, kt, 'ice_temp min', zmax(3), iloc(:,3), iareasum(3), iareamin(3), iareamax(3) ) 197 200 IF( Agrif_Root() ) THEN 198 201 WRITE(ctmp6,*) ' ===> output of last computed fields in output.abort* files'
Note: See TracChangeset
for help on using the changeset viewer.