Changeset 14644 for NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC
- Timestamp:
- 2021-03-26T15:33:49+01:00 (3 years ago)
- Location:
- NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final
- Property svn:externals
-
old new 9 9 10 10 # SETTE 11 ^/utils/CI/sette _wave@13990sette11 ^/utils/CI/sette@14244 sette
-
- Property svn:externals
-
NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC/diawri.F90
r14072 r14644 63 63 CONTAINS 64 64 65 #if defined key_ iomput66 !!---------------------------------------------------------------------- 67 !! 'key_ iomput' use IOM library65 #if defined key_xios 66 !!---------------------------------------------------------------------- 67 !! 'key_xios' use IOM library 68 68 !!---------------------------------------------------------------------- 69 69 INTEGER FUNCTION dia_wri_alloc() -
NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC/icesbc.F90
r14072 r14644 91 91 vtau_ice(ji,jj) = vtau_ice(ji,jj) * xcplmask(ji,jj,0) + zvtau_ice(ji,jj) * ( 1. - xcplmask(ji,jj,0) ) 92 92 END_2D 93 CALL lbc_lnk _multi( 'icesbc', utau_ice, 'U', -1.0_wp, vtau_ice, 'V', -1.0_wp )93 CALL lbc_lnk( 'icesbc', utau_ice, 'U', -1.0_wp, vtau_ice, 'V', -1.0_wp ) 94 94 ENDIF 95 95 ! -
NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC/nemogcm.F90
r14072 r14644 34 34 USE mppini ! shared/distributed memory setting (mpp_init routine) 35 35 USE lib_fortran ! Fortran utilities (allows no signed zero when 'key_nosignedzero' defined) 36 #if defined key_ iomput36 #if defined key_xios 37 37 USE xios ! xIOserver 38 38 #endif … … 46 46 CHARACTER(lc) :: cform_aaa="( /, 'AAAAAAAA', / ) " ! flag for output listing 47 47 48 #if defined key_mpp_mpi48 #if ! defined key_mpi_off 49 49 ! need MPI_Wtime 50 50 INCLUDE 'mpif.h' … … 113 113 CALL nemo_closefile 114 114 ! 115 #if defined key_ iomput115 #if defined key_xios 116 116 CALL xios_finalize ! end mpp communications with xios 117 117 #else … … 148 148 ! !-------------------------------------------------! 149 149 ! 150 #if defined key_ iomput150 #if defined key_xios 151 151 IF( Agrif_Root() ) THEN 152 152 CALL xios_initialize( "for_xios_mpi_id", return_comm=ilocal_comm ) ! nemo local communicator given by xios … … 243 243 ! 244 244 IF( ln_read_cfg ) THEN ! Read sizes in domain configuration file 245 CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio)245 CALL domain_cfg ( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype ) 246 246 ELSE ! user-defined namelist 247 CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, jperio)247 CALL usr_def_nam( cn_cfg, nn_cfg, Ni0glo, Nj0glo, jpkglo, l_Iperio, l_Jperio, l_NFold, c_NFtype ) 248 248 ENDIF 249 249 ! … … 373 373 !! *** ROUTINE nemo_alloc *** 374 374 !! 375 !! ** Purpose : Allocate all the dynamic arrays of the O PAmodules375 !! ** Purpose : Allocate all the dynamic arrays of the OCE modules 376 376 !! 377 377 !! ** Method : -
NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC/step_c1d.F90
r14072 r14644 36 36 !! 37 37 !! ** Purpose : - Time stepping of SBC including sea ice (dynamic and thermodynamic eqs.) 38 !! - Time stepping of O PA(momentum and active tracer eqs.)38 !! - Time stepping of OCE (momentum and active tracer eqs.) 39 39 !! - Time stepping of TOP (passive tracer eqs.) 40 40 !! … … 79 79 IF( lrst_oce ) CALL rst_write( kstp, Nbb, Nnn ) ! write output ocean restart file 80 80 ! 81 #if defined key_ iomput81 #if defined key_xios 82 82 IF( kstp == nitend .OR. nstop > 0 ) CALL xios_context_finalize() ! needed for XIOS 83 83 ! -
NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC/stpctl.F90
r14072 r14644 31 31 PUBLIC stp_ctl ! routine called by step.F90 32 32 33 INTEGER :: nrunid ! netcdf file id 34 INTEGER, DIMENSION(3) :: nvarid ! netcdf variable id 33 INTEGER, PARAMETER :: jpvar = 3 34 INTEGER :: nrunid ! netcdf file id 35 INTEGER, DIMENSION(jpvar) :: nvarid ! netcdf variable id 35 36 !!---------------------------------------------------------------------- 36 37 !! NEMO/SAS 4.0 , NEMO Consortium (2018) … … 59 60 INTEGER, INTENT(in ) :: Kmm ! ocean time level index 60 61 !! 62 INTEGER, PARAMETER :: jptst = 3 61 63 INTEGER :: ji ! dummy loop indices 62 64 INTEGER :: idtime, istatus 63 INTEGER , DIMENSION(4) :: iareasum, iareamin, iareamax 64 INTEGER , DIMENSION(3,3) :: iloc ! min/max loc indices 65 REAL(wp) :: zzz ! local real 66 REAL(wp), DIMENSION(4) :: zmax, zmaxlocal 65 INTEGER , DIMENSION(jptst) :: iareasum, iareamin, iareamax 66 INTEGER , DIMENSION(3,jptst) :: iloc ! min/max loc indices 67 REAL(wp) :: zzz ! local real 68 REAL(wp), DIMENSION(jpvar+1) :: zmax 69 REAL(wp), DIMENSION(jptst) :: zmaxlocal 67 70 LOGICAL :: ll_wrtstp, ll_colruns, ll_wrtruns, ll_0oce 68 71 LOGICAL, DIMENSION(jpi,jpj) :: llmsk … … 110 113 ! !== done by all processes at every time step ==! 111 114 ! 112 llmsk( 1:Nis1,:) = .FALSE.! exclude halos from the checked region113 llmsk(Nie 1:jpi,:) = .FALSE.114 llmsk(:, 1:Njs1) = .FALSE.115 llmsk(:,Nje 1:jpj) = .FALSE.115 llmsk( 1:nn_hls,:) = .FALSE. ! exclude halos from the checked region 116 llmsk(Nie0+1: jpi,:) = .FALSE. 117 llmsk(:, 1:nn_hls) = .FALSE. 118 llmsk(:,Nje0+1: jpj) = .FALSE. 116 119 ! 117 120 llmsk(Nis0:Nie0,Njs0:Nje0) = tmask(Nis0:Nie0,Njs0:Nje0,1) == 1._wp ! test only the inner domain … … 122 125 zmax(2) = MAXVAL( ABS( qns(:,:) ), mask = llmsk ) ! max non-solar heat flux 123 126 zmax(3) = MAXVAL( ABS( emp(:,:) ), mask = llmsk ) ! max E-P 124 zmax( 4) = REAL( nstop, wp )! stop indicator127 zmax(jpvar+1) = REAL( nstop, wp ) ! stop indicator 125 128 ! 126 129 ! !== get global extrema ==! 127 130 ! !== done by all processes if writting run.stat ==! 128 131 IF( ll_colruns ) THEN 129 zmaxlocal(:) = zmax( :)130 CALL mpp_max( "stpctl", zmax ) ! max over the global domain 131 nstop = NINT( zmax( 4) )! update nstop indicator (now sheared among all local domains)132 zmaxlocal(:) = zmax(1:jptst) 133 CALL mpp_max( "stpctl", zmax ) ! max over the global domain: ok even of ll_0oce = .true. 134 nstop = NINT( zmax(jpvar+1) ) ! update nstop indicator (now sheared among all local domains) 132 135 ELSE 133 136 ! if no ocean point: MAXVAL returns -HUGE => we must overwrite this value to avoid error handling bellow. 134 IF( ll_0oce ) zmax(1:3) = 0._wp ! default "valid" values... 135 ENDIF 136 ! !== error handling ==! 137 IF( ll_0oce ) zmax(1:jptst) = 0._wp ! default "valid" values... 138 ENDIF 137 139 ! !== write "run.stat" files ==! 138 140 ! !== done only by 1st subdomain at writting timestep ==! 139 141 IF( ll_wrtruns ) THEN 140 WRITE(numrun,9500) kt, zmax(1 ), zmax(2), zmax(3)141 DO ji = 1, 3142 WRITE(numrun,9500) kt, zmax(1:jptst) 143 DO ji = 1, jpvar 142 144 istatus = NF90_PUT_VAR( nrunid, nvarid(ji), (/zmax(ji)/), (/kt/), (/1/) ) 143 145 END DO 144 IF( kt == nitend ) istatus = NF90_CLOSE(nrunid)146 IF( kt == nitend ) istatus = NF90_CLOSE(nrunid) 145 147 END IF 146 148 ! !== error handling ==! 147 149 ! !== done by all processes at every time step ==! 148 150 ! 149 IF( zmax(1) > 5._wp .OR. & ! too large wind stress ( > 5 N/m^2 )150 & zmax(2) > 2000._wp .OR. & ! too large non-solar heat flux ( > 2000 W/m^2 )151 & zmax(3) > 1.E-3_wp .OR. & ! too large net freshwater flux ( > 1.E-3 kg/m^2/s )152 & ISNAN( zmax(1) + zmax(2) + zmax(3) ) .OR. & ! NaN encounter in the tests153 & ABS( zmax(1) + zmax(2) + zmax(3) ) > HUGE(1._wp) ) THEN ! Infinity encounter in the tests151 IF( zmax(1) > 5._wp .OR. & ! too large wind stress ( > 5 N/m^2 ) 152 & zmax(2) > 2000._wp .OR. & ! too large non-solar heat flux ( > 2000 W/m^2 ) 153 & zmax(3) > 1.E-3_wp .OR. & ! too large net freshwater flux ( > 1.E-3 kg/m^2/s ) 154 & ISNAN( SUM(zmax(1:jptst)) ) .OR. & ! NaN encounter in the tests 155 & ABS( SUM(zmax(1:jptst)) ) > HUGE(1._wp) ) THEN ! Infinity encounter in the tests 154 156 ! 155 157 iloc(:,:) = 0 … … 163 165 ! find which subdomain has the max. 164 166 iareamin(:) = jpnij+1 ; iareamax(:) = 0 ; iareasum(:) = 0 165 DO ji = 1, 4167 DO ji = 1, jptst 166 168 IF( zmaxlocal(ji) == zmax(ji) ) THEN 167 169 iareamin(ji) = narea ; iareamax(ji) = narea ; iareasum(ji) = 1 … … 176 178 iloc(1:2,2) = MAXLOC( ABS( qns(:,:) ), mask = llmsk ) 177 179 iloc(1:2,3) = MINLOC( ABS( emp(:,:) ), mask = llmsk ) 178 DO ji = 1, 3! local domain indices ==> global domain indices, excluding halos180 DO ji = 1, jptst ! local domain indices ==> global domain indices, excluding halos 179 181 iloc(1:2,ji) = (/ mig0(iloc(1,ji)), mjg0(iloc(2,ji)) /) 180 182 END DO … … 195 197 ! 196 198 IF( ll_colruns .OR. jpnij == 1 ) THEN ! all processes synchronized -> use lwp to print in opened ocean.output files 197 IF(lwp) THEN 198 CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 199 ELSE 200 nstop = MAX(1, nstop) ! make sure nstop > 0 (automatically done when calling ctl_stop) 199 IF(lwp) THEN ; CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 200 ELSE ; nstop = MAX(1, nstop) ! make sure nstop > 0 (automatically done when calling ctl_stop) 201 201 ENDIF 202 202 ELSE ! only mpi subdomains with errors are here -> STOP now … … 239 239 240 240 WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpnij ,wp))) + 1 ! how many digits to we need to write ? (we decide max = 9) 241 !!! WRITE(clsum, '(i'//clfmt//')') ksum ! this is creating a compilation error with AGRIF241 !!! WRITE(clsum, '(i'//clfmt//')') ksum ! this is creating a compilation error with AGRIF 242 242 cl4 = '(i'//clfmt//')' ; WRITE(clsum, cl4) ksum 243 243 WRITE(clfmt, '(i1)') INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1 ! how many digits to we need to write ? (we decide max = 9) 244 244 cl4 = '(i'//clfmt//')' ; WRITE(clmin, cl4) kmin-1 245 WRITE(clmax, cl4) kmax-1245 WRITE(clmax, cl4) kmax-1 246 246 ! 247 247 WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpiglo,wp))) + 1 ! how many digits to we need to write jpiglo? (we decide max = 9) … … 259 259 ELSE 260 260 WRITE(clfmt, '(i1)') INT(LOG10(REAL(jpk,wp))) + 1 ! how many digits to we need to write jpk? (we decide max = 9) 261 !!! WRITE(clk, '(i'//clfmt//')') kloc(3) ! this is creating a compilation error with AGRIF261 !!! WRITE(clk, '(i'//clfmt//')') kloc(3) ! this is creating a compilation error with AGRIF 262 262 cl4 = '(i'//clfmt//')' ; WRITE(clk, cl4) kloc(3) ! this is ok with AGRIF 263 263 WRITE(cdline,9400) TRIM(ADJUSTL(clkt)), TRIM(ADJUSTL(cdprefix)), pval, TRIM(cli), TRIM(clj), TRIM(clk), TRIM(clsuff) -
NEMO/branches/2020/dev_r14116_HPC-04_mcastril_Mixed_Precision_implementation_final/tests/STATION_ASF/MY_SRC/usrdef_nam.F90
r14072 r14644 37 37 CONTAINS 38 38 39 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, kperio)39 SUBROUTINE usr_def_nam( cd_cfg, kk_cfg, kpi, kpj, kpk, ldIperio, ldJperio, ldNFold, cdNFtype ) 40 40 !!---------------------------------------------------------------------- 41 41 !! *** ROUTINE dom_nam *** … … 49 49 !! ** input : - namusr_def namelist found in namelist_cfg 50 50 !!---------------------------------------------------------------------- 51 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 52 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 53 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 54 INTEGER , INTENT(out) :: kperio ! lateral global domain b.c. 51 CHARACTER(len=*), INTENT(out) :: cd_cfg ! configuration name 52 INTEGER , INTENT(out) :: kk_cfg ! configuration resolution 53 INTEGER , INTENT(out) :: kpi, kpj, kpk ! global domain sizes 54 LOGICAL , INTENT(out) :: ldIperio, ldJperio ! i- and j- periodicity 55 LOGICAL , INTENT(out) :: ldNFold ! North pole folding 56 CHARACTER(len=1), INTENT(out) :: cdNFtype ! Folding type: T or F 55 57 ! 56 58 INTEGER :: ios ! Local integer … … 73 75 ! 74 76 ! ! Set the lateral boundary condition of the global domain 75 kperio = 7 ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition 77 ldIperio = .TRUE. ; ldJperio = .true. ! C1D configuration : 3x3 basin with cyclic Est-West and Norht-South condition 78 ldNFold = .FALSE. ; cdNFtype = '-' 76 79 ! 77 80 ! ! control print … … 85 88 WRITE(numout,*) ' number of model levels kpk = ', kpk 86 89 WRITE(numout,*) ' ' 87 WRITE(numout,*) ' Lateral b.c. of the domain set to jperio = ', kperio88 90 ENDIF 89 91 !
Note: See TracChangeset
for help on using the changeset viewer.