Changeset 11476
- Timestamp:
- 2019-08-28T10:02:49+02:00 (5 years ago)
- Location:
- NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled
- Files:
-
- 13 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled/cfgs/SHARED/domain_def_nemo.xml
r9930 r11476 182 182 <!-- zonal mean grid --> 183 183 <domain id="gznl" long_name="gznl"/> 184 <domain id="ptr" domain_ref="gznl" > 185 <zoom_domain id="ptr" ibegin="0000" jbegin="0" ni="1" nj="0000" /> 186 </domain> 184 187 <domain id="znl_T" domain_ref="gznl" > <zoom_domain id="znl_T"/> </domain> 185 188 <domain id="znl_W" domain_ref="gznl" > <zoom_domain id="znl_W"/> </domain> -
NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled/cfgs/SHARED/field_def_nemo-oce.xml
r11474 r11476 20 20 <field_group id="grid_T" grid_ref="grid_T_2D" > 21 21 <field id="e3t" long_name="T-cell thickness" standard_name="cell_thickness" unit="m" grid_ref="grid_T_3D" /> 22 <field id="e3t_surf" long_name="T-cell thickness" field_ref="e3t" standard_name="cell_thickness" unit="m" grid_ref="grid_T_ SFC"/>22 <field id="e3t_surf" long_name="T-cell thickness" field_ref="e3t" standard_name="cell_thickness" unit="m" grid_ref="grid_T_surface_extract"/> 23 23 <field id="e3t_0" long_name="Initial T-cell thickness" standard_name="ref_cell_thickness" unit="m" grid_ref="grid_T_3D" /> 24 24 … … 62 62 <field id="mldr10_1max" long_name="Max of Mixed Layer Depth (dsigma = 0.01 wrt 10m)" field_ref="mldr10_1" operation="maximum" /> 63 63 <field id="mldr10_1min" long_name="Min of Mixed Layer Depth (dsigma = 0.01 wrt 10m)" field_ref="mldr10_1" operation="minimum" /> 64 <field id="mldzint_1" long_name="Mixed Layer Depth interpolated" standard_name="ocean_mixed_layer_thickness" unit="m" /> 65 <field id="mldzint_2" long_name="Mixed Layer Depth interpolated" standard_name="ocean_mixed_layer_thickness" unit="m" /> 66 <field id="mldzint_3" long_name="Mixed Layer Depth interpolated" standard_name="ocean_mixed_layer_thickness" unit="m" /> 67 <field id="mldzint_4" long_name="Mixed Layer Depth interpolated" standard_name="ocean_mixed_layer_thickness" unit="m" /> 68 <field id="mldzint_5" long_name="Mixed Layer Depth interpolated" standard_name="ocean_mixed_layer_thickness" unit="m" /> 69 <field id="mldhtc_1" long_name="Mixed Layer Depth integrated heat content" standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content" unit="J/m2" /> 70 <field id="mldhtc_2" long_name="Mixed Layer Depth integrated heat content" standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content" unit="J/m2" /> 71 <field id="mldhtc_3" long_name="Mixed Layer Depth integrated heat content" standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content" unit="J/m2" /> 72 <field id="mldhtc_4" long_name="Mixed Layer Depth integrated heat content" standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content" unit="J/m2" /> 73 <field id="mldhtc_5" long_name="Mixed Layer Depth integrated heat content" standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content" unit="J/m2" /> 64 74 <field id="heatc" long_name="Heat content vertically integrated" standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content" unit="J/m2" /> 65 75 <field id="saltc" long_name="Salt content vertically integrated" unit="1e-3*kg/m2" /> … … 357 367 <field id="uoce" long_name="ocean current along i-axis" standard_name="sea_water_x_velocity" unit="m/s" grid_ref="grid_U_3D" /> 358 368 <field id="uoce_e3u" long_name="ocean current along i-axis (thickness weighted)" unit="m/s" grid_ref="grid_U_3D" > uoce * e3u </field> 369 <field id="uoce2_e3u" long_name="ocean current along i-axis squared (thickness weighted)" unit="m3/s2" grid_ref="grid_U_3D" > uoce * uoce * e3u </field> 359 370 <field id="ssu" long_name="ocean surface current along i-axis" unit="m/s" /> 360 371 <field id="sbu" long_name="ocean bottom current along i-axis" unit="m/s" /> … … 411 422 <field id="voce" long_name="ocean current along j-axis" standard_name="sea_water_y_velocity" unit="m/s" grid_ref="grid_V_3D" /> 412 423 <field id="voce_e3v" long_name="ocean current along j-axis (thickness weighted)" unit="m/s" grid_ref="grid_V_3D" > voce * e3v </field> 424 <field id="voce2_e3v" long_name="ocean current along j-axis squared (thickness weighted)" unit="m3/s2" grid_ref="grid_V_3D" > voce * voce * e3v </field> 413 425 <field id="ssv" long_name="ocean surface current along j-axis" unit="m/s" /> 414 426 <field id="sbv" long_name="ocean bottom current along j-axis" unit="m/s" /> … … 502 514 <field id="ahmf_2d" long_name=" surface f-eddy viscosity coefficient" unit="m2/s or m4/s" /> 503 515 <field id="ahmf_3d" long_name=" 3D f-eddy viscosity coefficient" unit="m2/s or m4/s" grid_ref="grid_T_3D"/> 516 517 <!-- product fields --> 518 <field_group id="diaprod"> 519 <field id="ut" long_name="product_of_sea_water_x_velocity_and_potential_temperature" unit="degree_C m/s" grid_ref="grid_U_3D" /> 520 <field id="ut_e3u" long_name="product_of_sea_water_x_velocity_and_potential_temperature * e3u" unit="degree_C m2/s" grid_ref="grid_U_3D" > ut * e3u </field > 521 <field id="us" long_name="product_of_sea_water_x_velocity_and_salinity" unit="PSU m/s" grid_ref="grid_U_3D" /> 522 <field id="us_e3u" long_name="product_of_sea_water_x_velocity_and_salinity * e3u" unit="PSU m2/s" grid_ref="grid_U_3D" > us * e3u </field > 523 <field id="urhop" long_name="product_of_sea_water_x_velocity_and_potential_density" unit="(kg/m3).(m/s)" grid_ref="grid_U_3D" /> 524 <field id="urhop_e3u" long_name="product_of_sea_water_x_velocity_and_potential_density * e3u" unit="(kg/m3).(m2/s)" grid_ref="grid_U_3D" > urhop * e3u </field > 525 <field id="vt" long_name="product_of_sea_water_y_velocity_and_potential_temperature" unit="degree_C m/s" grid_ref="grid_V_3D" /> 526 <field id="vt_e3v" long_name="product_of_sea_water_y_velocity_and_potential_temperature * e3v" unit="degree_C m2/s" grid_ref="grid_V_3D" > vt * e3v </field > 527 <field id="vs" long_name="product_of_sea_water_y_velocity_and_salinity" unit="PSU m/s" grid_ref="grid_V_3D" /> 528 <field id="vs_e3v" long_name="product_of_sea_water_y_velocity_and_salinity * e3t" unit="PSU m2/s" grid_ref="grid_V_3D" > vs * e3v </field > 529 <field id="vrhop" long_name="product_of_sea_water_y_velocity_and_potential_density" unit="(kg/m3).(m/s)" grid_ref="grid_V_3D" /> 530 <field id="vrhop_e3v" long_name="product_of_sea_water_y_velocity_and_potential_density * e3t" unit="(kg/m3).(m2/s)" grid_ref="grid_V_3D" > vrhop * e3v </field > 531 <field id="wt" long_name="product_of_upward_sea_water_velocity_and_potential_temperature" unit="degree_C m/s" grid_ref="grid_W_3D" /> 532 <field id="ws" long_name="product_of_upward_sea_water_velocity_and_salinity" unit="PSU m/s" grid_ref="grid_W_3D" /> 533 <field id="wrhop" long_name="product_of_upward_sea_water_velocity_and_potential_density" unit="(kg/m3).(m/s)" grid_ref="grid_W_3D" /> 534 <field id="uv" long_name="product_of_sea_water_x_velocity_and_sea_water_y_velocity" unit="m2/s2 " grid_ref="grid_T_3D" /> 535 <field id="uw" long_name="product_of_upward_sea_water_velocity_and_sea_water_x_velocity" unit="m2/s2 " grid_ref="grid_W_3D" /> 536 <field id="vw" long_name="product_of_upward_sea_water_velocity_and_sea_water_y_velocity" unit="m2/s2" grid_ref="grid_W_3D" /> 537 </field_group> 504 538 505 539 <field_group id="scalar" grid_ref="grid_T_2D" > -
NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled/cfgs/SHARED/grid_def_nemo.xml
r10226 r11476 57 57 <axis id="nfloat" /> 58 58 </grid> 59 <!-- --> 60 <grid id="grid_EqT" > 61 <domain id="EqT" /> 62 </grid> 63 <!-- --> 64 <grid id="gznl_T_2D"> 65 <domain id="ptr" /> 66 </grid> 67 <!-- --> 68 <grid id="gznl_T_3D"> 69 <domain id="ptr" /> 70 <axis axis_ref="deptht" /> 71 </grid> 72 <!-- --> 73 <grid id="gznl_W_2D"> 74 <domain id="ptr" /> 75 </grid> 76 <!-- --> 77 <grid id="gznl_W_3D"> 78 <domain id="ptr" /> 79 <axis axis_ref="depthw" /> 80 </grid> 81 <grid id="vert_sum"> 82 <domain id="grid_T"/> 83 <scalar> 84 <reduce_axis operation="sum" /> 85 </scalar> 86 </grid> 87 <grid id="zoom_300"> 88 <domain id="grid_T" /> 89 <axis axis_ref="deptht300"/> 90 </grid> 91 <grid id="zoom_300_sum"> 92 <domain id="grid_T" /> 93 <scalar> 94 <reduce_axis operation="sum" /> 95 </scalar> 96 </grid> 97 <grid id="grid_T_surface_extract"> 98 <domain id="grid_T" /> 99 <axis axis_ref="deptht_surface" /> 100 </grid> 59 101 60 102 </grid_definition> -
NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled/src/ICE/icerst.F90
r10888 r11476 21 21 USE in_out_manager ! I/O manager 22 22 USE iom ! I/O manager library 23 USE ioipsl, ONLY : ju2ymds ! for calendar 23 24 USE lib_mpp ! MPP library 24 25 USE lib_fortran ! fortran utilities (glob_sum + no signed zero) … … 46 47 INTEGER, INTENT(in) :: kt ! number of iteration 47 48 ! 49 INTEGER :: iyear, imonth, iday 50 REAL (wp) :: zsec 51 REAL (wp) :: zfjulday 48 52 CHARACTER(len=20) :: clkt ! ocean time-step define as a character 49 53 CHARACTER(len=50) :: clname ! ice output restart file name … … 60 64 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 61 65 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 62 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 63 ELSE ; WRITE(clkt, '(i8.8)') nitrst 66 IF ( ln_rstdate ) THEN 67 zfjulday = fjulday + (2*nn_fsbc+1)*rdt / rday 68 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 69 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 70 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 71 ELSE 72 IF( nitrst > 99999999 ) THEN ; WRITE(clkt, * ) nitrst 73 ELSE ; WRITE(clkt, '(i8.8)') nitrst 74 ENDIF 64 75 ENDIF 65 76 ! create the file -
NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled/src/OCE/DOM/domain.F90
r10888 r11476 292 292 & nn_it000, nn_itend , nn_date0 , nn_time0 , nn_leapy , nn_istate , & 293 293 & nn_stock, nn_write , ln_mskland , ln_clobber , nn_chunksz, nn_euler , & 294 & ln_cfmeta, ln_iscpl, ln_xios_read, nn_wxios 294 & ln_cfmeta, ln_iscpl, ln_xios_read, nn_wxios, ln_rstdate 295 295 NAMELIST/namdom/ ln_linssh, rn_isfhmin, rn_rdt, rn_atfp, ln_crs, ln_meshmask 296 296 #if defined key_netcdf4 … … 338 338 WRITE(numout,*) ' frequency of output file nn_write = ', nn_write 339 339 WRITE(numout,*) ' mask land points ln_mskland = ', ln_mskland 340 WRITE(numout,*) ' date-stamp restart files ln_rstdate = ', ln_rstdate 340 341 WRITE(numout,*) ' additional CF standard metadata ln_cfmeta = ', ln_cfmeta 341 342 WRITE(numout,*) ' overwrite an existing file ln_clobber = ', ln_clobber -
NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled/src/OCE/DOM/dommsk.F90
r10888 r11476 32 32 USE lbclnk ! ocean lateral boundary conditions (or mpp link) 33 33 USE lib_mpp ! Massively Parallel Processing library 34 USE iom ! For shlat2d 35 USE fldread ! for sn_shlat2d 34 36 35 37 IMPLICIT NONE … … 92 94 INTEGER :: iktop, ikbot ! - - 93 95 INTEGER :: ios, inum 94 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zwf ! 2D workspace 95 !! 96 NAMELIST/namlbc/ rn_shlat, ln_vorlat 96 !! 97 INTEGER :: inum ! logical unit for shlat2d 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 !! 103 NAMELIST/namlbc/ rn_shlat, ln_vorlat, ln_shlat2d, cn_shlat2d_file, cn_shlat2d_var 97 104 NAMELIST/nambdy/ ln_bdy ,nb_bdy, ln_coords_file, cn_coords_file, & 98 105 & ln_mask_file, cn_mask_file, cn_dyn2d, nn_dyn2d_dta, & … … 122 129 ! 123 130 IF(lwp) WRITE(numout,*) 124 IF ( rn_shlat == 0. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral free-slip' 125 ELSEIF ( rn_shlat == 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral no-slip' 126 ELSEIF ( 0. < rn_shlat .AND. rn_shlat < 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral partial-slip' 127 ELSEIF ( 2. < rn_shlat ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral strong-slip' 131 132 IF ( ln_shlat2d ) THEN 133 IF(lwp) WRITE(numout,*) ' READ shlat as a 2D coefficient in a file ' 134 ALLOCATE( zshlat2d(jpi,jpj) ) 135 CALL iom_open(TRIM(cn_shlat2d_file), inum) 136 CALL iom_get (inum, jpdom_data, TRIM(cn_shlat2d_var), zshlat2d, 1) ! 137 CALL iom_close(inum) 128 138 ELSE 129 CALL ctl_stop( 'dom_msk: wrong value for rn_shlat (i.e. a negalive value). We stop.' ) 139 IF ( rn_shlat == 0. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral free-slip' 140 ELSEIF ( rn_shlat == 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral no-slip' 141 ELSEIF ( 0. < rn_shlat .AND. rn_shlat < 2. ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral partial-slip' 142 ELSEIF ( 2. < rn_shlat ) THEN ; IF(lwp) WRITE(numout,*) ' ==>>> ocean lateral strong-slip' 143 ELSE 144 CALL ctl_stop( 'dom_msk: wrong value for rn_shlat (i.e. a negalive value). We stop.' ) 145 ENDIF 130 146 ENDIF 131 147 … … 241 257 ! Lateral boundary conditions on velocity (modify fmask) 242 258 ! --------------------------------------- 243 IF( rn_shlat /= 0 ) THEN ! Not free-slip lateral boundary condition 244 ! 245 ALLOCATE( zwf(jpi,jpj) ) 259 IF( rn_shlat /= 0 .or. ln_shlat2d ) THEN ! Not free-slip lateral boundary condition everywhere 246 260 ! 247 261 DO jk = 1, jpk 248 zwf(:,:) = fmask(:,:,jk) 249 DO jj = 2, jpjm1 250 DO ji = fs_2, fs_jpim1 ! vector opt. 251 IF( fmask(ji,jj,jk) == 0._wp ) THEN 252 fmask(ji,jj,jk) = rn_shlat * MIN( 1._wp , MAX( zwf(ji+1,jj), zwf(ji,jj+1), & 253 & zwf(ji-1,jj), zwf(ji,jj-1) ) ) 254 ENDIF 262 IF ( ln_shlat2d ) THEN 263 DO jj = 2, jpjm1 264 DO ji = fs_2, fs_jpim1 ! vector opt. 265 IF( fmask(ji,jj,jk) == 0._wp ) THEN 266 fmask(ji,jj,jk) = zshlat2d(ji,jj) * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk), & 267 & vmask(ji,jj,jk), vmask(ji+1,jj,jk) ) ) 268 ENDIF 269 END DO 255 270 END DO 256 END DO 271 ELSE 272 DO jj = 2, jpjm1 273 DO ji = fs_2, fs_jpim1 ! vector opt. 274 IF( fmask(ji,jj,jk) == 0._wp ) THEN 275 fmask(ji,jj,jk) = rn_shlat * MIN( 1._wp , MAX( umask(ji,jj,jk), umask(ji,jj+1,jk), & 276 & vmask(ji,jj,jk), vmask(ji+1,jj,jk) ) ) 277 ENDIF 278 END DO 279 END DO 280 ENDIF 257 281 DO jj = 2, jpjm1 258 282 IF( fmask(1,jj,jk) == 0._wp ) THEN 259 fmask(1 ,jj,jk) = rn_shlat * MIN( 1._wp , MAX( zwf(2,jj), zwf(1,jj+1), zwf(1,jj-1) ) )283 fmask(1 ,jj,jk) = rn_shlat * MIN( 1._wp , MAX( vmask(2,jj,jk), umask(1,jj+1,jk), umask(1,jj,jk) ) ) 260 284 ENDIF 261 285 IF( fmask(jpi,jj,jk) == 0._wp ) THEN 262 fmask(jpi,jj,jk) = rn_shlat * MIN( 1._wp , MAX( zwf(jpi,jj+1), zwf(jpim1,jj), zwf(jpi,jj-1) ) )286 fmask(jpi,jj,jk) = rn_shlat * MIN( 1._wp , MAX( umask(jpi,jj+1,jk), vmask(jpim1,jj,jk), umask(jpi,jj-1,jk) ) ) 263 287 ENDIF 264 288 END DO 265 289 DO ji = 2, jpim1 266 290 IF( fmask(ji,1,jk) == 0._wp ) THEN 267 fmask(ji, 1 ,jk) = rn_shlat * MIN( 1._wp , MAX( zwf(ji+1,1), zwf(ji,2), zwf(ji-1,1) ) )291 fmask(ji, 1 ,jk) = rn_shlat * MIN( 1._wp , MAX( vmask(ji+1,1,jk), umask(ji,2,jk), vmask(ji,1,jk) ) ) 268 292 ENDIF 269 293 IF( fmask(ji,jpj,jk) == 0._wp ) THEN 270 fmask(ji,jpj,jk) = rn_shlat * MIN( 1._wp , MAX( zwf(ji+1,jpj), zwf(ji-1,jpj), zwf(ji,jpjm1) ) )294 fmask(ji,jpj,jk) = rn_shlat * MIN( 1._wp , MAX( vmask(ji+1,jpj,jk), vmask(ji-1,jpj,jk), umask(ji,jpjm1,jk) ) ) 271 295 ENDIF 272 296 END DO … … 281 305 END DO 282 306 ! 283 DEALLOCATE( zwf)307 IF( ln_shlat2d ) DEALLOCATE( zshlat2d ) 284 308 ! 285 309 CALL lbc_lnk( 'dommsk', fmask, 'F', 1._wp ) ! Lateral boundary conditions on fmask -
NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled/src/OCE/ICB/icbrst.F90
r10888 r11476 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 … … 190 191 INTEGER :: jn ! dummy loop index 191 192 INTEGER :: ix_dim, iy_dim, ik_dim, in_dim 192 CHARACTER(len=256) :: cl_path 193 CHARACTER(len=256) :: cl_filename 193 INTEGER :: iyear, imonth, iday 194 REAL (wp) :: zsec 195 REAL (wp) :: zfjulday 196 CHARACTER(len=256) :: cl_path 197 CHARACTER(len=256) :: cl_filename 198 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 194 199 TYPE(iceberg), POINTER :: this 195 200 TYPE(point) , POINTER :: pt … … 206 211 cl_path = TRIM(cn_ocerst_outdir) 207 212 IF( cl_path(LEN_TRIM(cl_path):) /= '/' ) cl_path = TRIM(cl_path) // '/' 213 IF ( ln_rstdate ) THEN 214 zfjulday = fjulday + rdt / rday 215 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 216 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 217 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 218 ELSE 219 IF( kt > 999999999 ) THEN ; WRITE(clkt, * ) kt 220 ELSE ; WRITE(clkt, '(i8.8)') kt 221 ENDIF 222 ENDIF 208 223 IF( lk_mpp ) THEN 209 WRITE(cl_filename,'(A,"_icebergs_", I8.8,"_restart_",I4.4,".nc")') TRIM(cexper), kt, narea-1224 WRITE(cl_filename,'(A,"_icebergs_",A,"_restart_",I4.4,".nc")') TRIM(cexper), TRIM(ADJUSTL(clkt)), narea-1 210 225 ELSE 211 WRITE(cl_filename,'(A,"_icebergs_", I8.8,"_restart.nc")') TRIM(cexper), kt226 WRITE(cl_filename,'(A,"_icebergs_",A,"_restart.nc")') TRIM(cexper), TRIM(ADJUSTL(clkt)) 212 227 ENDIF 213 228 IF ( lwp .AND. nn_verbose_level >= 0) WRITE(numout,'(2a)') 'icebergs, write_restart: creating ', & -
NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled/src/OCE/IOM/in_out_manager.F90
r10888 r11476 40 40 INTEGER, DIMENSION(10) :: nn_stocklist !: restart dump times 41 41 LOGICAL :: ln_mskland !: mask land points in NetCDF outputs (costly: + ~15%) 42 LOGICAL :: ln_rstdate !: T=> stamp output restart files with date instead of timestep 42 43 LOGICAL :: ln_cfmeta !: output additional data to netCDF files required for compliance with the CF metadata standard 43 44 LOGICAL :: ln_clobber !: clobber (overwrite) an existing file -
NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled/src/OCE/IOM/restart.F90
r10888 r11476 27 27 USE in_out_manager ! I/O manager 28 28 USE iom ! I/O module 29 USE ioipsl, ONLY : ju2ymds ! for calendar 29 30 USE diurnal_bulk 30 31 USE lib_mpp ! distribued memory computing library … … 59 60 INTEGER, INTENT(in) :: kt ! ocean time-step 60 61 !! 62 INTEGER :: iyear, imonth, iday 63 REAL (wp) :: zsec 64 REAL (wp) :: zfjulday 61 65 CHARACTER(LEN=20) :: clkt ! ocean time-step deine as a character 62 66 CHARACTER(LEN=50) :: clname ! ocean output restart file name … … 88 92 IF( nitrst <= nitend .AND. nitrst > 0 ) THEN 89 93 ! beware of the format used to write kt (default is i8.8, that should be large enough...) 90 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 91 ELSE ; WRITE(clkt, '(i8.8)') nitrst 94 IF ( ln_rstdate ) THEN 95 zfjulday = fjulday + rdt / rday 96 IF( ABS(zfjulday - REAL(NINT(zfjulday),wp)) < 0.1 / rday ) zfjulday = REAL(NINT(zfjulday),wp) ! avoid truncation error 97 CALL ju2ymds( zfjulday, iyear, imonth, iday, zsec ) 98 WRITE(clkt, '(i4.4,2i2.2)') iyear, imonth, iday 99 ELSE 100 IF( nitrst > 999999999 ) THEN ; WRITE(clkt, * ) nitrst 101 ELSE ; WRITE(clkt, '(i8.8)') nitrst 102 ENDIF 92 103 ENDIF 93 104 ! create the file -
NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled/src/OCE/TRA/trabbl.F90
r10888 r11476 513 513 IF( tra_bbl_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'tra_bbl_init : unable to allocate arrays' ) 514 514 ! 515 IF( nn_bbl_adv == 1 ) WRITE(numout,*) ' * Advective BBL using upper velocity' 516 IF( nn_bbl_adv == 2 ) WRITE(numout,*) ' * Advective BBL using velocity = F( delta rho)' 515 IF(lwp) THEN 516 IF( nn_bbl_adv == 1 ) WRITE(numout,*) ' * Advective BBL using upper velocity' 517 IF( nn_bbl_adv == 2 ) WRITE(numout,*) ' * Advective BBL using velocity = F( delta rho)' 518 ENDIF 517 519 ! 518 520 ! !* vertical index of "deep" bottom u- and v-points -
NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled/src/OCE/ZDF/zdfmxl.F90
r10888 r11476 15 15 USE trc_oce , ONLY: l_offline ! ocean space and time domain variables 16 16 USE zdf_oce ! ocean vertical physics 17 USE eosbn2 ! for zdf_mxl_zint 17 18 ! 18 19 USE in_out_manager ! I/O manager … … 31 32 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hmlp !: mixed layer depth (rho=rho0+zdcrit) [m] (used by LDF) 32 33 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hmlpt !: depth of the last T-point inside the mixed layer [m] (used by LDF) 34 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: hmld_zint !: vertically-interpolated mixed layer depth [m] 35 REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: htc_mld ! Heat content of hmld_zint 36 LOGICAL, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: ll_found ! Is T_b to be found by interpolation ? 37 LOGICAL, PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: ll_belowml ! Flag points below mixed layer when ll_found=F 33 38 34 39 REAL(wp), PUBLIC :: rho_c = 0.01_wp !: density criterion for mixed layer depth 35 40 REAL(wp), PUBLIC :: avt_c = 5.e-4_wp ! Kz criterion for the turbocline depth 41 42 TYPE, PUBLIC :: MXL_ZINT !: Structure for MLD defs 43 INTEGER :: mld_type ! mixed layer type 44 REAL(wp) :: zref ! depth of initial T_ref 45 REAL(wp) :: dT_crit ! Critical temp diff 46 REAL(wp) :: iso_frac ! Fraction of rn_dT_crit 47 END TYPE MXL_ZINT 36 48 37 49 !!---------------------------------------------------------------------- … … 48 60 zdf_mxl_alloc = 0 ! set to zero if no array to be allocated 49 61 IF( .NOT. ALLOCATED( nmln ) ) THEN 50 ALLOCATE( nmln(jpi,jpj), hmld(jpi,jpj), hmlp(jpi,jpj), hmlpt(jpi,jpj), STAT= zdf_mxl_alloc ) 62 ALLOCATE( nmln(jpi,jpj), hmld(jpi,jpj), hmlp(jpi,jpj), hmlpt(jpi,jpj), hmld_zint(jpi,jpj), & 63 & htc_mld(jpi,jpj), ll_found(jpi,jpj), ll_belowml(jpi,jpj,jpk), STAT= zdf_mxl_alloc ) 51 64 ! 52 65 CALL mpp_sum ( 'zdfmxl', zdf_mxl_alloc ) … … 137 150 ENDIF 138 151 ! 152 ! Vertically-interpolated mixed-layer depth diagnostic 153 CALL zdf_mxl_zint( kt ) 154 ! 139 155 IF(ln_ctl) CALL prt_ctl( tab2d_1=REAL(nmln,wp), clinfo1=' nmln : ', tab2d_2=hmlp, clinfo2=' hmlp : ' ) 140 156 ! 141 157 END SUBROUTINE zdf_mxl 158 159 SUBROUTINE zdf_mxl_zint_mld( sf ) 160 !!---------------------------------------------------------------------------------- 161 !! *** ROUTINE zdf_mxl_zint_mld *** 162 ! 163 ! Calculate vertically-interpolated mixed layer depth diagnostic. 164 ! 165 ! This routine can calculate the mixed layer depth diagnostic suggested by 166 ! Kara et al, 2000, JGR, 105, 16803, but is more general and can calculate 167 ! vertically-interpolated mixed-layer depth diagnostics with other parameter 168 ! settings set in the namzdf_mldzint namelist. 169 ! 170 ! If mld_type=1 the mixed layer depth is calculated as the depth at which the 171 ! density has increased by an amount equivalent to a temperature difference of 172 ! 0.8C at the surface. 173 ! 174 ! For other values of mld_type the mixed layer is calculated as the depth at 175 ! which the temperature differs by 0.8C from the surface temperature. 176 ! 177 ! David Acreman, Daley Calvert 178 ! 179 !!----------------------------------------------------------------------------------- 180 181 TYPE(MXL_ZINT), INTENT(in) :: sf 182 183 ! Diagnostic criteria 184 INTEGER :: nn_mld_type ! mixed layer type 185 REAL(wp) :: rn_zref ! depth of initial T_ref 186 REAL(wp) :: rn_dT_crit ! Critical temp diff 187 REAL(wp) :: rn_iso_frac ! Fraction of rn_dT_crit used 188 189 ! Local variables 190 REAL(wp), PARAMETER :: zepsilon = 1.e-30 ! local small value 191 INTEGER, DIMENSION(jpi,jpj) :: ikmt ! number of active tracer levels 192 INTEGER, DIMENSION(jpi,jpj) :: ik_ref ! index of reference level 193 INTEGER, DIMENSION(jpi,jpj) :: ik_iso ! index of last uniform temp level 194 REAL, DIMENSION(jpi,jpj,jpk) :: zT ! Temperature or density 195 REAL, DIMENSION(jpi,jpj) :: ppzdep ! depth for use in calculating d(rho) 196 REAL, DIMENSION(jpi,jpj) :: zT_ref ! reference temperature 197 REAL :: zT_b ! base temperature 198 REAL, DIMENSION(jpi,jpj,jpk) :: zdTdz ! gradient of zT 199 REAL, DIMENSION(jpi,jpj,jpk) :: zmoddT ! Absolute temperature difference 200 REAL :: zdz ! depth difference 201 REAL :: zdT ! temperature difference 202 REAL, DIMENSION(jpi,jpj) :: zdelta_T ! difference critereon 203 REAL, DIMENSION(jpi,jpj) :: zRHO1, zRHO2 ! Densities 204 INTEGER :: ji, jj, jk ! loop counter 205 206 !!------------------------------------------------------------------------------------- 207 ! 208 ! Unpack structure 209 nn_mld_type = sf%mld_type 210 rn_zref = sf%zref 211 rn_dT_crit = sf%dT_crit 212 rn_iso_frac = sf%iso_frac 213 214 ! Set the mixed layer depth criterion at each grid point 215 IF( nn_mld_type == 0 ) THEN 216 zdelta_T(:,:) = rn_dT_crit 217 zT(:,:,:) = rhop(:,:,:) 218 ELSE IF( nn_mld_type == 1 ) THEN 219 ppzdep(:,:)=0.0 220 call eos ( tsn(:,:,1,:), ppzdep(:,:), zRHO1(:,:) ) 221 ! Use zT temporarily as a copy of tsn with rn_dT_crit added to SST 222 ! [assumes number of tracers less than number of vertical levels] 223 zT(:,:,1:jpts)=tsn(:,:,1,1:jpts) 224 zT(:,:,jp_tem)=zT(:,:,1)+rn_dT_crit 225 CALL eos( zT(:,:,1:jpts), ppzdep(:,:), zRHO2(:,:) ) 226 zdelta_T(:,:) = abs( zRHO1(:,:) - zRHO2(:,:) ) * rau0 227 ! RHO from eos (2d version) doesn't calculate north or east halo: 228 CALL lbc_lnk( 'zdfmxl', zdelta_T, 'T', 1. ) 229 zT(:,:,:) = rhop(:,:,:) 230 ELSE 231 zdelta_T(:,:) = rn_dT_crit 232 zT(:,:,:) = tsn(:,:,:,jp_tem) 233 END IF 234 235 ! Calculate the gradient of zT and absolute difference for use later 236 DO jk = 1 ,jpk-2 237 zdTdz(:,:,jk) = ( zT(:,:,jk+1) - zT(:,:,jk) ) / e3w_n(:,:,jk+1) 238 zmoddT(:,:,jk) = abs( zT(:,:,jk+1) - zT(:,:,jk) ) 239 END DO 240 241 ! Find density/temperature at the reference level (Kara et al use 10m). 242 ! ik_ref is the index of the box centre immediately above or at the reference level 243 ! Find rn_zref in the array of model level depths and find the ref 244 ! density/temperature by linear interpolation. 245 DO jk = jpkm1, 2, -1 246 WHERE ( gdept_n(:,:,jk) > rn_zref ) 247 ik_ref(:,:) = jk - 1 248 zT_ref(:,:) = zT(:,:,jk-1) + zdTdz(:,:,jk-1) * ( rn_zref - gdept_n(:,:,jk-1) ) 249 END WHERE 250 END DO 251 252 ! If the first grid box centre is below the reference level then use the 253 ! top model level to get zT_ref 254 WHERE ( gdept_n(:,:,1) > rn_zref ) 255 zT_ref = zT(:,:,1) 256 ik_ref = 1 257 END WHERE 258 259 ! The number of active tracer levels is 1 less than the number of active w levels 260 ikmt(:,:) = mbkt(:,:) - 1 261 262 ! Initialize / reset 263 ll_found(:,:) = .false. 264 265 IF ( rn_iso_frac - zepsilon > 0. ) THEN 266 ! Search for a uniform density/temperature region where adjacent levels 267 ! differ by less than rn_iso_frac * deltaT. 268 ! ik_iso is the index of the last level in the uniform layer 269 ! ll_found indicates whether the mixed layer depth can be found by interpolation 270 ik_iso(:,:) = ik_ref(:,:) 271 DO jj = 1, nlcj 272 DO ji = 1, nlci 273 !CDIR NOVECTOR 274 DO jk = ik_ref(ji,jj), ikmt(ji,jj)-1 275 IF ( zmoddT(ji,jj,jk) > ( rn_iso_frac * zdelta_T(ji,jj) ) ) THEN 276 ik_iso(ji,jj) = jk 277 ll_found(ji,jj) = ( zmoddT(ji,jj,jk) > zdelta_T(ji,jj) ) 278 EXIT 279 END IF 280 END DO 281 END DO 282 END DO 283 284 ! Use linear interpolation to find depth of mixed layer base where possible 285 hmld_zint(:,:) = rn_zref 286 DO jj = 1, jpj 287 DO ji = 1, jpi 288 IF (ll_found(ji,jj) .and. tmask(ji,jj,1) == 1.0) THEN 289 zdz = abs( zdelta_T(ji,jj) / zdTdz(ji,jj,ik_iso(ji,jj)) ) 290 hmld_zint(ji,jj) = gdept_n(ji,jj,ik_iso(ji,jj)) + zdz 291 END IF 292 END DO 293 END DO 294 END IF 295 296 ! If ll_found = .false. then calculate MLD using difference of zdelta_T 297 ! from the reference density/temperature 298 299 ! Prevent this section from working on land points 300 WHERE ( tmask(:,:,1) /= 1.0 ) 301 ll_found = .true. 302 END WHERE 303 304 DO jk=1, jpk 305 ll_belowml(:,:,jk) = abs( zT(:,:,jk) - zT_ref(:,:) ) >= zdelta_T(:,:) 306 END DO 307 308 ! Set default value where interpolation cannot be used (ll_found=false) 309 DO jj = 1, jpj 310 DO ji = 1, jpi 311 IF ( .not. ll_found(ji,jj) ) hmld_zint(ji,jj) = gdept_n(ji,jj,ikmt(ji,jj)) 312 END DO 313 END DO 314 315 DO jj = 1, jpj 316 DO ji = 1, jpi 317 !CDIR NOVECTOR 318 DO jk = ik_ref(ji,jj)+1, ikmt(ji,jj) 319 IF ( ll_found(ji,jj) ) EXIT 320 IF ( ll_belowml(ji,jj,jk) ) THEN 321 zT_b = zT_ref(ji,jj) + zdelta_T(ji,jj) * SIGN(1.0, zdTdz(ji,jj,jk-1) ) 322 zdT = zT_b - zT(ji,jj,jk-1) 323 zdz = zdT / zdTdz(ji,jj,jk-1) 324 hmld_zint(ji,jj) = gdept_n(ji,jj,jk-1) + zdz 325 EXIT 326 END IF 327 END DO 328 END DO 329 END DO 330 331 hmld_zint(:,:) = hmld_zint(:,:)*tmask(:,:,1) 332 ! 333 END SUBROUTINE zdf_mxl_zint_mld 334 335 SUBROUTINE zdf_mxl_zint_htc( kt ) 336 !!---------------------------------------------------------------------- 337 !! *** ROUTINE zdf_mxl_zint_htc *** 338 !! 339 !! ** Purpose : 340 !! 341 !! ** Method : 342 !!---------------------------------------------------------------------- 343 344 INTEGER, INTENT(in) :: kt ! ocean time-step index 345 346 INTEGER :: ji, jj, jk 347 INTEGER :: ikmax 348 REAL(wp) :: zc, zcoef 349 ! 350 INTEGER, ALLOCATABLE, DIMENSION(:,:) :: ilevel 351 REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zthick_0, zthick 352 353 !!---------------------------------------------------------------------- 354 355 IF( .NOT. ALLOCATED(ilevel) ) THEN 356 ALLOCATE( ilevel(jpi,jpj), zthick_0(jpi,jpj), & 357 & zthick(jpi,jpj), STAT=ji ) 358 IF( lk_mpp ) CALL mpp_sum( 'zdfmxl', ji ) 359 IF( ji /= 0 ) CALL ctl_stop( 'STOP', 'zdf_mxl_zint_htc : unable to allocate arrays' ) 360 ENDIF 361 362 ! Find last whole model T level above the MLD 363 ilevel(:,:) = 0 364 zthick_0(:,:) = 0._wp 365 366 DO jk = 1, jpkm1 367 DO jj = 1, jpj 368 DO ji = 1, jpi 369 zthick_0(ji,jj) = zthick_0(ji,jj) + e3t_n(ji,jj,jk) 370 IF( zthick_0(ji,jj) < hmld_zint(ji,jj) ) ilevel(ji,jj) = jk 371 END DO 372 END DO 373 WRITE(numout,*) 'zthick_0(jk =',jk,') =',zthick_0(2,2) 374 WRITE(numout,*) 'gdepw_n(jk+1 =',jk+1,') =',gdepw_n(2,2,jk+1) 375 END DO 376 377 ! Surface boundary condition 378 IF( ln_linssh ) THEN ; zthick(:,:) = sshn(:,:) ; htc_mld(:,:) = tsn(:,:,1,jp_tem) * sshn(:,:) * tmask(:,:,1) 379 ELSE ; zthick(:,:) = 0._wp ; htc_mld(:,:) = 0._wp 380 ENDIF 381 382 ! Deepest whole T level above the MLD 383 ikmax = MIN( MAXVAL( ilevel(:,:) ), jpkm1 ) 384 385 ! Integration down to last whole model T level 386 DO jk = 1, ikmax 387 DO jj = 1, jpj 388 DO ji = 1, jpi 389 zc = e3t_n(ji,jj,jk) * REAL( MIN( MAX( 0, ilevel(ji,jj) - jk + 1 ) , 1 ) ) ! 0 below ilevel 390 zthick(ji,jj) = zthick(ji,jj) + zc 391 htc_mld(ji,jj) = htc_mld(ji,jj) + zc * tsn(ji,jj,jk,jp_tem) * tmask(ji,jj,jk) 392 END DO 393 END DO 394 END DO 395 396 ! Subsequent partial T level 397 zthick(:,:) = hmld_zint(:,:) - zthick(:,:) ! remaining thickness to reach MLD 398 399 DO jj = 1, jpj 400 DO ji = 1, jpi 401 htc_mld(ji,jj) = htc_mld(ji,jj) + tsn(ji,jj,ilevel(ji,jj)+1,jp_tem) & 402 & * MIN( e3t_n(ji,jj,ilevel(ji,jj)+1), zthick(ji,jj) ) * tmask(ji,jj,ilevel(ji,jj)+1) 403 END DO 404 END DO 405 406 WRITE(numout,*) 'htc_mld(after) =',htc_mld(2,2) 407 408 ! Convert to heat content 409 zcoef = rau0 * rcp 410 htc_mld(:,:) = zcoef * htc_mld(:,:) 411 412 END SUBROUTINE zdf_mxl_zint_htc 413 414 SUBROUTINE zdf_mxl_zint( kt ) 415 !!---------------------------------------------------------------------- 416 !! *** ROUTINE zdf_mxl_zint *** 417 !! 418 !! ** Purpose : 419 !! 420 !! ** Method : 421 !!---------------------------------------------------------------------- 422 423 INTEGER, INTENT(in) :: kt ! ocean time-step index 424 425 INTEGER :: ios 426 INTEGER :: jn 427 428 INTEGER :: nn_mld_diag = 0 ! number of diagnostics 429 430 CHARACTER(len=1) :: cmld 431 432 TYPE(MXL_ZINT) :: sn_mld1, sn_mld2, sn_mld3, sn_mld4, sn_mld5 433 TYPE(MXL_ZINT), SAVE, DIMENSION(5) :: mld_diags 434 435 NAMELIST/namzdf_mldzint/ nn_mld_diag, sn_mld1, sn_mld2, sn_mld3, sn_mld4, sn_mld5 436 437 !!---------------------------------------------------------------------- 438 439 IF( kt == nit000 ) THEN 440 REWIND( numnam_ref ) ! Namelist namzdf_mldzint in reference namelist 441 READ ( numnam_ref, namzdf_mldzint, IOSTAT = ios, ERR = 901) 442 901 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_mldzint in reference namelist', lwp ) 443 444 REWIND( numnam_cfg ) ! Namelist namzdf_mldzint in configuration namelist 445 READ ( numnam_cfg, namzdf_mldzint, IOSTAT = ios, ERR = 902 ) 446 902 IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_mldzint in configuration namelist', lwp ) 447 IF(lwm) WRITE ( numond, namzdf_mldzint ) 448 449 IF( nn_mld_diag > 5 ) CALL ctl_stop( 'STOP', 'zdf_mxl_ini: Specify no more than 5 MLD definitions' ) 450 451 mld_diags(1) = sn_mld1 452 mld_diags(2) = sn_mld2 453 mld_diags(3) = sn_mld3 454 mld_diags(4) = sn_mld4 455 mld_diags(5) = sn_mld5 456 457 IF( lwp .AND. (nn_mld_diag > 0) ) THEN 458 WRITE(numout,*) '=============== Vertically-interpolated mixed layer ================' 459 WRITE(numout,*) '(Diagnostic number, nn_mld_type, rn_zref, rn_dT_crit, rn_iso_frac)' 460 DO jn = 1, nn_mld_diag 461 WRITE(numout,*) 'MLD criterion',jn,':' 462 WRITE(numout,*) ' nn_mld_type =', mld_diags(jn)%mld_type 463 WRITE(numout,*) ' rn_zref =' , mld_diags(jn)%zref 464 WRITE(numout,*) ' rn_dT_crit =' , mld_diags(jn)%dT_crit 465 WRITE(numout,*) ' rn_iso_frac =', mld_diags(jn)%iso_frac 466 END DO 467 WRITE(numout,*) '====================================================================' 468 ENDIF 469 ENDIF 470 471 IF( nn_mld_diag > 0 ) THEN 472 DO jn = 1, nn_mld_diag 473 WRITE(cmld,'(I1)') jn 474 IF( iom_use( "mldzint_"//cmld ) .OR. iom_use( "mldhtc_"//cmld ) ) THEN 475 CALL zdf_mxl_zint_mld( mld_diags(jn) ) 476 477 IF( iom_use( "mldzint_"//cmld ) ) THEN 478 CALL iom_put( "mldzint_"//cmld, hmld_zint(:,:) ) 479 ENDIF 480 481 IF( iom_use( "mldhtc_"//cmld ) ) THEN 482 CALL zdf_mxl_zint_htc( kt ) 483 CALL iom_put( "mldhtc_"//cmld , htc_mld(:,:) ) 484 ENDIF 485 ENDIF 486 END DO 487 ENDIF 488 489 END SUBROUTINE zdf_mxl_zint 142 490 143 491 !!====================================================================== -
NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled/src/OCE/step.F90
r10888 r11476 218 218 CALL dia_ar5 ( kstp ) ! ar5 diag 219 219 IF( lk_diaharm ) CALL dia_harm( kstp ) ! Tidal harmonic analysis 220 CALL dia_prod( kstp ) ! ocean model: product diagnostics 220 221 CALL dia_wri ( kstp ) ! ocean model: outputs 221 222 ! -
NEMO/branches/UKMO/NEMO_4.0_mirror_SI3_decoupled/src/OCE/step_oce.F90
r10888 r11476 80 80 USE diahsb ! heat, salt and volume budgets (dia_hsb routine) 81 81 USE diaharm 82 USE diaprod 82 83 USE diacfl 83 84 USE diaobs ! Observation operator
Note: See TracChangeset
for help on using the changeset viewer.