Changeset 15080
- Timestamp:
- 2021-07-05T16:19:12+02:00 (3 years ago)
- Location:
- NEMO/branches/UKMO/NEMO_r4.2RC_GO8_package
- Files:
-
- 19 added
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_r4.2RC_GO8_package/src/ICE/icerst.F90
r14239 r15080 27 27 USE in_out_manager ! I/O manager 28 28 USE iom ! I/O manager library 29 USE ioipsl , ONLY : ju2ymds ! for calendar 29 30 USE lib_mpp ! MPP library 30 31 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) … … 52 53 INTEGER, INTENT(in) :: kt ! number of iteration 53 54 ! 55 INTEGER :: iyear, imonth, iday 56 REAL (wp) :: zsec 57 REAL (wp) :: zfjulday 54 58 CHARACTER(len=20) :: clkt ! ocean time-step define as a character 55 59 CHARACTER(len=50) :: clname ! ice output restart file name … … 68 72 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 69 73 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 70 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 71 ELSE ; WRITE(clkt, '(i8.8)') nitrst 74 IF ( ln_rstdate ) THEN 75 zfjulday = fjulday + (2*nn_fsbc+1)*rdt / rday 76 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 77 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 78 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 79 ELSE 80 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 81 ELSE ; WRITE(clkt, '(i8.8)') nitrst 82 ENDIF 72 83 ENDIF 73 84 ! create the file -
NEMO/branches/UKMO/NEMO_r4.2RC_GO8_package/src/ICE/icethd_pnd.F90
r14997 r15080 545 545 ! a_ip_frac -> apnd 546 546 547 CALL ctl_stop( 'STOP', 'icethd_pnd : topographic melt ponds are still an ongoing work' )547 ! CALL ctl_stop( 'STOP', 'icethd_pnd : topographic melt ponds are still an ongoing work' ) 548 548 549 549 !--------------------------------------------------------------- -
NEMO/branches/UKMO/NEMO_r4.2RC_GO8_package/src/OCE/DIA/diawri.F90
r15017 r15080 54 54 USE iom ! 55 55 USE ioipsl ! 56 USE eosbn2 56 57 57 58 #if defined key_si3 … … 125 126 REAL(wp), DIMENSION(A2D( 0)) :: z2d ! 2D workspace 126 127 REAL(wp), DIMENSION(A2D(nn_hls),jpk) :: z3d ! 3D workspace 128 CHARACTER(len=4),SAVE :: ttype , stype ! temperature and salinity type 127 129 !!---------------------------------------------------------------------- 128 130 ! 129 131 IF( ln_timing ) CALL timing_start('dia_wri') 132 ! 133 IF( kt == nit000 ) THEN 134 IF( ln_TEOS10 ) THEN 135 IF ( iom_use("toce_pot") .OR. iom_use("soce_pra") .OR. iom_use("sst_pot") .OR. iom_use("sss_pra") & 136 & .OR. iom_use("sbt_pot") .OR. iom_use("sbs_pra") .OR. iom_use("sstgrad_pot") .OR. iom_use("sstgrad2_pot") & 137 & .OR. iom_use("tosmint_pot") .OR. iom_use("somint_pra")) THEN 138 CALL ctl_stop( 'diawri: potential temperature and practical salinity not available with ln_TEOS10' ) 139 ELSE 140 ttype='con' ; stype='abs' ! teos-10 using conservative temperature and absolute salinity 141 ENDIF 142 ELSE IF( ln_EOS80 ) THEN 143 IF ( iom_use("toce_con") .OR. iom_use("soce_abs") .OR. iom_use("sst_con") .OR. iom_use("sss_abs") & 144 & .OR. iom_use("sbt_con") .OR. iom_use("sbs_abs") .OR. iom_use("sstgrad_con") .OR. iom_use("sstgrad2_con") & 145 & .OR. iom_use("tosmint_con") .OR. iom_use("somint_abs")) THEN 146 CALL ctl_stop( 'diawri: conservative temperature and absolute salinity not available with ln_EOS80' ) 147 ELSE 148 ttype='pot' ; stype='pra' ! eos-80 using potential temperature and practical salinity 149 ENDIF 150 ELSE IF ( ln_SEOS) THEN 151 ttype='seos' ; stype='seos' ! seos using Simplified Equation of state 152 ENDIF 153 ENDIF 154 130 155 ! 131 156 ! Output the initial state and forcings … … 200 225 #endif 201 226 202 CALL iom_put( "toce ", ts(:,:,:,jp_tem,Kmm) ) ! 3D temperature203 CALL iom_put( "sst ", ts(:,:,1,jp_tem,Kmm) ) ! surface temperature204 IF ( iom_use("sbt ") ) THEN227 CALL iom_put( "toce_"//ttype, ts(:,:,:,jp_tem,Kmm) ) ! 3D temperature 228 CALL iom_put( "sst_"//ttype, ts(:,:,1,jp_tem,Kmm) ) ! surface temperature 229 IF ( iom_use("sbt_"//ttype) ) THEN 205 230 DO_2D( 0, 0, 0, 0 ) 206 231 ikbot = mbkt(ji,jj) 207 232 z2d(ji,jj) = ts(ji,jj,ikbot,jp_tem,Kmm) 208 233 END_2D 209 CALL iom_put( "sbt ", z2d ) ! bottom temperature234 CALL iom_put( "sbt_"//ttype, z2d ) ! bottom temperature 210 235 ENDIF 211 236 212 CALL iom_put( "soce ", ts(:,:,:,jp_sal,Kmm) ) ! 3D salinity213 CALL iom_put( "sss ", ts(:,:,1,jp_sal,Kmm) ) ! surface salinity214 IF ( iom_use("sbs ") ) THEN237 CALL iom_put( "soce_"//stype, ts(:,:,:,jp_sal,Kmm) ) ! 3D salinity 238 CALL iom_put( "sss_"//stype, ts(:,:,1,jp_sal,Kmm) ) ! surface salinity 239 IF ( iom_use("sbs_"//stype) ) THEN 215 240 DO_2D( 0, 0, 0, 0 ) 216 241 ikbot = mbkt(ji,jj) 217 242 z2d(ji,jj) = ts(ji,jj,ikbot,jp_sal,Kmm) 218 243 END_2D 219 CALL iom_put( "sbs ", z2d ) ! bottom salinity244 CALL iom_put( "sbs_"//stype, z2d ) ! bottom salinity 220 245 ENDIF 221 246 … … 298 323 ENDIF 299 324 300 IF ( iom_use("sstgrad ") .OR. iom_use("sstgrad2") ) THEN325 IF ( iom_use("sstgrad_"//ttype) .OR. iom_use("sstgrad2_"//ttype) ) THEN 301 326 DO_2D( 0, 0, 0, 0 ) ! sst gradient 302 327 zztmp = ts(ji,jj,1,jp_tem,Kmm) … … 306 331 & * umask(ji,jj,1) * umask(ji-1,jj,1) * vmask(ji,jj,1) * vmask(ji,jj-1,1) 307 332 END_2D 308 CALL iom_put( "sstgrad2 ", z2d ) ! square of module of sst gradient309 IF ( iom_use("sstgrad ") ) THEN333 CALL iom_put( "sstgrad2_"//ttype, z2d ) ! square of module of sst gradient 334 IF ( iom_use("sstgrad_"//ttype) ) THEN 310 335 DO_2D( 0, 0, 0, 0 ) 311 336 z2d(ji,jj) = SQRT( z2d(ji,jj) ) 312 337 END_2D 313 CALL iom_put( "sstgrad ", z2d ) ! module of sst gradient338 CALL iom_put( "sstgrad_"//ttype, z2d ) ! module of sst gradient 314 339 ENDIF 315 340 ENDIF … … 441 466 ENDIF 442 467 443 IF( iom_use("tosmint") ) THEN 468 IF( (.NOT.l_ldfeiv_time) .AND. ( iom_use('RossRad') .OR. iom_use('RossRadlim') & 469 & .OR. iom_use('Tclinic_recip') .OR. iom_use('RR_GS') & 470 & .OR. iom_use('aeiu_2d') .OR. iom_use('aeiv_2d') ) ) THEN 471 CALL ldf_eiv(kt, 75.0, z2d, z3d(:,:,1), Kmm) 472 CALL iom_put('aeiu_2d', z2d) 473 CALL iom_put('aeiv_2d', z3d(:,:,1)) 474 ENDIF 475 476 477 IF( iom_use("tosmint_"//ttype) ) THEN 444 478 z2d(:,:) = 0._wp 445 479 DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 446 480 z2d(ji,jj) = z2d(ji,jj) + rho0 * e3t(ji,jj,jk,Kmm) * ts(ji,jj,jk,jp_tem,Kmm) 447 481 END_3D 448 CALL iom_put( "tosmint ", z2d ) ! Vertical integral of temperature449 ENDIF 450 IF( iom_use("somint ") ) THEN482 CALL iom_put( "tosmint_"//ttype, z2d ) ! Vertical integral of temperature 483 ENDIF 484 IF( iom_use("somint_"//stype) ) THEN 451 485 z2d(:,:) = 0._wp 452 486 DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 453 487 z2d(ji,jj) = z2d(ji,jj) + rho0 * e3t(ji,jj,jk,Kmm) * ts(ji,jj,jk,jp_sal,Kmm) 454 488 END_3D 455 CALL iom_put( "somint ", z2d ) ! Vertical integral of salinity489 CALL iom_put( "somint_"//stype, z2d ) ! Vertical integral of salinity 456 490 ENDIF 457 491 -
NEMO/branches/UKMO/NEMO_r4.2RC_GO8_package/src/OCE/DOM/domain.F90
r15023 r15080 316 316 & nn_it000, nn_itend , nn_date0 , nn_time0 , nn_leapy , nn_istate , & 317 317 & nn_stock, nn_write , ln_mskland , ln_clobber , nn_chunksz, ln_1st_euler , & 318 & ln_cfmeta, ln_xios_read, nn_wxios 318 & ln_cfmeta, ln_xios_read, nn_wxios, ln_rstdate, ln_rst_eos 319 319 NAMELIST/namdom/ ln_linssh, rn_Dt, rn_atfp, ln_crs, ln_c1d, ln_meshmask 320 320 NAMELIST/namtile/ ln_tile, nn_ltile_i, nn_ltile_j … … 417 417 #endif 418 418 WRITE(numout,*) ' mask land points ln_mskland = ', ln_mskland 419 WRITE(numout,*) ' date-stamp restart files ln_rstdate = ', ln_rstdate 419 420 WRITE(numout,*) ' additional CF standard metadata ln_cfmeta = ', ln_cfmeta 420 421 WRITE(numout,*) ' overwrite an existing file ln_clobber = ', ln_clobber -
NEMO/branches/UKMO/NEMO_r4.2RC_GO8_package/src/OCE/DOM/dommsk.F90
r15014 r15080 34 34 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 35 35 USE lib_mpp ! Massively Parallel Processing library 36 USE iom ! For shlat2d 37 USE fldread ! for sn_shlat2d 38 36 39 37 40 IMPLICIT NONE … … 93 96 INTEGER :: ios, inum 94 97 !! 95 NAMELIST/namlbc/ rn_shlat, ln_vorlat 98 REAL(wp) :: zshlat !: locally modified shlat for some strait 99 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zshlat2d 100 LOGICAL :: ln_shlat2d 101 CHARACTER(len = 256) :: cn_shlat2d_file, cn_shlat2d_var 102 NAMELIST/namlbc/ rn_shlat, ln_vorlat, ln_shlat2d, cn_shlat2d_file, cn_shlat2d_var 96 103 NAMELIST/nambdy/ ln_bdy ,nb_bdy, ln_coords_file, cn_coords_file, & 97 104 & ln_mask_file, cn_mask_file, cn_dyn2d, nn_dyn2d_dta, & … … 118 125 ! 119 126 IF(lwp) WRITE(numout,*) 120 IF ( rn_shlat == 0. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral free-slip' 121 ELSEIF ( rn_shlat == 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral no-slip' 122 ELSEIF ( 0. < rn_shlat .AND. rn_shlat < 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral partial-slip' 123 ELSEIF ( 2. < rn_shlat ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral strong-slip' 124 ELSE 125 CALL ctl_stop( 'dom_msk: wrong value for rn_shlat (i.e. a negalive value). We stop.' ) 127 IF ( ln_shlat2d ) THEN 128 IF(lwp) WRITE(numout,*) ' READ shlat as a 2D coefficient in a file ' 129 ALLOCATE( zshlat2d(jpi,jpj) ) 130 CALL iom_open(TRIM(cn_shlat2d_file), inum) 131 CALL iom_get (inum, jpdom_global, TRIM(cn_shlat2d_var), zshlat2d, 1) ! 132 CALL iom_close(inum) 133 ELSE 134 IF ( rn_shlat == 0. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral free-slip' 135 ELSEIF ( rn_shlat == 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral no-slip' 136 ELSEIF ( 0. < rn_shlat .AND. rn_shlat < 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral partial-slip' 137 ELSEIF ( 2. < rn_shlat ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral strong-slip' 138 ELSE 139 CALL ctl_stop( 'dom_msk: wrong value for rn_shlat (i.e. a negalive value). We stop.' ) 140 ENDIF 126 141 ENDIF 127 142 … … 202 217 ! Lateral boundary conditions on velocity (modify fmask) 203 218 ! --------------------------------------- 204 IF( rn_shlat /= 0._wp ) THEN ! Not free-slip lateral boundary condition 205 ! 206 DO_3D( 0, 0, 0, 0, 1, jpk ) 207 IF( fmask(ji,jj,jk) == 0._wp ) THEN 208 fmask(ji,jj,jk) = rn_shlat * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk), & 209 & vmask(ji,jj,jk), vmask(ji+1,jj,jk) ) ) 210 ENDIF 211 END_3D 219 IF( rn_shlat /= 0._wp .or. ln_shlat2d ) THEN ! Not free-slip lateral boundary condition 220 ! 221 IF ( ln_shlat2d ) THEN 222 DO_3D( 0, 0, 0, 0, 1, jpk ) 223 IF( fmask(ji,jj,jk) == 0._wp ) THEN 224 fmask(ji,jj,jk) = zshlat2d(ji,jj) * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk), & 225 & vmask(ji,jj,jk), vmask(ji+1,jj,jk) ) ) 226 ENDIF 227 END_3D 228 ELSE 229 DO_3D( 0, 0, 0, 0, 1, jpk ) 230 IF( fmask(ji,jj,jk) == 0._wp ) THEN 231 fmask(ji,jj,jk) = rn_shlat * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk), & 232 & vmask(ji,jj,jk), vmask(ji+1,jj,jk) ) ) 233 ENDIF 234 END_3D 235 END IF 236 ! 237 IF( ln_shlat2d ) DEALLOCATE( zshlat2d ) 238 ! 212 239 CALL lbc_lnk( 'dommsk', fmask, 'F', 1._wp ) ! Lateral boundary conditions on fmask 213 240 ! … … 219 246 ! -------------------------------- 220 247 ! 221 CALL usr_def_fmask( cn_cfg, nn_cfg, fmask ) 248 IF ( .not. ln_shlat2d ) THEN 249 CALL usr_def_fmask( cn_cfg, nn_cfg, fmask ) 250 ENDIF 222 251 ! 223 252 END SUBROUTINE dom_msk -
NEMO/branches/UKMO/NEMO_r4.2RC_GO8_package/src/OCE/ICB/icbrst.F90
r13286 r15080 25 25 USE netcdf ! netcdf routines for IO 26 26 USE iom 27 USE ioipsl, ONLY : ju2ymds ! for calendar 27 28 USE icb_oce ! define iceberg arrays 28 29 USE icbutl ! iceberg utility routines … … 191 192 INTEGER :: idg ! number of digits 192 193 INTEGER :: ix_dim, iy_dim, ik_dim, in_dim 194 INTEGER :: iyear, imonth, iday 195 REAL (wp) :: zsec 196 REAL (wp) :: zfjulday 193 197 CHARACTER(len=256) :: cl_path 194 198 CHARACTER(len=256) :: cl_filename 195 CHARACTER( len=8 ) :: cl_kt199 CHARACTER(LEN=20) :: cl_kt ! ocean time-step deine as a character 196 200 CHARACTER(LEN=12 ) :: clfmt ! writing format 197 201 TYPE(iceberg), POINTER :: this … … 213 217 ! 214 218 ! file name 215 WRITE(cl_kt, '(i8.8)') kt 216 cl_filename = TRIM(cexper)//"_"//cl_kt//"_"//TRIM(cn_icbrst_out) 219 IF ( ln_rstdate ) THEN 220 zfjulday = fjulday + rdt / rday 221 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 222 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 223 WRITE(cl_kt, '(i4.4,2i2.2)') iyear, imonth, iday 224 ELSE 225 IF( kt > 999999999 ) THEN ; WRITE(cl_kt, * ) kt 226 ELSE ; WRITE(cl_kt, '(i8.8)') kt 227 ENDIF 228 ENDIF 229 cl_filename = TRIM(cexper)//"_icebergs_"//TRIM(ADJUSTL(cl_kt))//"_restart" 217 230 IF( lk_mpp ) THEN 218 231 idg = MAX( INT(LOG10(REAL(MAX(1,jpnij-1),wp))) + 1, 4 ) ! how many digits to we need to write? min=4, max=9 -
NEMO/branches/UKMO/NEMO_r4.2RC_GO8_package/src/OCE/IOM/in_out_manager.F90
r14553 r15080 28 28 LOGICAL :: ln_rstart !: start from (F) rest or (T) a restart file 29 29 LOGICAL :: ln_rst_list !: output restarts at list of times (T) or by frequency (F) 30 LOGICAL :: ln_rst_eos !: check equation of state used for the restart is consistent with model 30 31 INTEGER :: nn_rstctl !: control of the time step (0, 1 or 2) 31 32 INTEGER :: nn_rstssh = 0 !: hand made initilization of ssh or not (1/0) … … 40 41 INTEGER, DIMENSION(10) :: nn_stocklist !: restart dump times 41 42 LOGICAL :: ln_mskland !: mask land points in NetCDF outputs (costly: + ~15%) 43 LOGICAL :: ln_rstdate !: T=> stamp output restart files with date instead of timestep 42 44 LOGICAL :: ln_cfmeta !: output additional data to netCDF files required for compliance with the CF metadata standard 43 45 LOGICAL :: ln_clobber !: clobber (overwrite) an existing file -
NEMO/branches/UKMO/NEMO_r4.2RC_GO8_package/src/OCE/IOM/restart.F90
r14834 r15080 34 34 USE in_out_manager ! I/O manager 35 35 USE iom ! I/O module 36 USE ioipsl, ONLY : ju2ymds ! for calendar 36 37 USE lib_mpp ! distribued memory computing library 37 38 … … 67 68 INTEGER, INTENT(in) :: kt ! ocean time-step 68 69 !! 70 INTEGER :: iyear, imonth, iday 71 REAL (wp) :: zsec 72 REAL (wp) :: zfjulday 69 73 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 70 74 CHARACTER(LEN=50) :: clname ! ocean output restart file name … … 98 102 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 99 103 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 100 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 101 ELSE ; WRITE(clkt, '(i8.8)') nitrst 104 105 IF ( ln_rstdate ) THEN 106 zfjulday = fjulday + rdt / rday 107 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 108 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 109 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 110 ELSE 111 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 112 ELSE ; WRITE(clkt, '(i8.8)') nitrst 113 ENDIF 102 114 ENDIF 103 115 ! create the file … … 182 194 ENDIF 183 195 196 CALL iom_rstput( kt, nitrst, numrow, 'neos' , REAL(neos)) ! equation of state 197 !CALL iom_rstput( kt, nitrst, numrow, 'neos' , neos , ktype = jp_i1, ldxios = lwxios) ! equation of state 198 184 199 IF( ln_diurnal ) CALL iom_rstput( kt, nitrst, numrow, 'Dsst', x_dsst ) 185 200 IF( kt == nitrst ) THEN … … 266 281 INTEGER , INTENT(in) :: Kbb, Kmm ! ocean time level indices 267 282 INTEGER :: jk 283 REAL(wp) :: zeos 268 284 REAL(wp), DIMENSION(jpi, jpj, jpk) :: w3d 269 285 REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: zgdept ! 3D workspace for QCO … … 282 298 RETURN 283 299 ENDIF 300 ! IF ( ln_rst_eos ) THEN 301 ! ! Check equation of state used is consistent with the restart 302 ! IF( iom_varid( numror, 'neos') == -1) THEN 303 ! CALL ctl_stop( 'restart, rst_read: variable neos not found. STOP check that the equations of state in the restart file and in the namelist nameos are consistent and use ln_rst_eos=F') 304 ! ELSE 305 ! CALL iom_get( numror, 'neos', zeos, ldxios = lrxios ) 306 ! IF ( INT(zeos) /= neos ) CALL ctl_stop( 'restart, rst_read: equation of state used in restart file differs from namelist nameos') 307 ! ENDIF 308 ! ENDIF 309 284 310 ! 285 311 #if defined key_RK3 -
NEMO/branches/UKMO/NEMO_r4.2RC_GO8_package/src/OCE/module_example.F90
r14842 r15080 52 52 # include "do_loop_substitute.h90" 53 53 !for other substitutions 54 # include "exampl_substitute.h90"55 54 !!---------------------------------------------------------------------- 56 55 !! NEMO/OCE 4.0 , NEMO Consortium (2018)
Note: See TracChangeset
for help on using the changeset viewer.