Changeset 15211
- Timestamp:
- 2021-08-31T12:01:23+02:00 (3 years ago)
- Location:
- branches/UKMO/dev_r5518_C3S_ocean_diags/NEMOGCM
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_C3S_ocean_diags/NEMOGCM/CONFIG/SHARED/field_def.xml
r5517 r15211 83 83 <field id="28d" long_name="Depth of 28C isotherm" standard_name="depth_of_isosurface_of_sea_water_potential_temperature" unit="m" axis_ref="iax_28C" /> 84 84 <field id="hc300" long_name="Heat content 0-300m" standard_name="integral_of_sea_water_potential_temperature_wrt_depth_expressed_as_heat_content" unit="J/m2" /> 85 <field id="tav300" long_name="Average potential temperature 0-300m" standard_name="sea_water_potential_temperature" unit="degC" /> 86 <field id="sav300" long_name="Average salinity 0-300m" standard_name="sea_water_practical_salinity" unit="0.001" /> 85 87 86 88 <!-- variables available with key_diaar5 --> -
branches/UKMO/dev_r5518_C3S_ocean_diags/NEMOGCM/NEMO/OPA_SRC/DIA/diahth.F90
r5363 r15211 37 37 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: hd28 !: depth of 28 C isotherm [m] 38 38 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: htc3 !: heat content of first 300 m [W] 39 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: tav3 !: Average temp of first 300 m [degC] 40 REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) :: sav3 !: Average salinity of first 300 m [PSU] 39 41 40 42 !! * Substitutions … … 53 55 ! 54 56 ALLOCATE(hth(jpi,jpj), hd20(jpi,jpj), hd28(jpi,jpj), htc3(jpi,jpj), STAT=dia_hth_alloc) 57 ! 58 ALLOCATE(tav3(jpi,jpj), sav3(jpi,jpj), STAT=dia_hth_alloc) 55 59 ! 56 60 IF( lk_mpp ) CALL mpp_sum ( dia_hth_alloc ) … … 92 96 REAL(wp) :: zztmp, zzdep ! temporary scalars inside do loop 93 97 REAL(wp) :: zu, zv, zw, zut, zvt ! temporary workspace 98 REAL(wp) :: depth_remain ! temporary float 94 99 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: zabs2 ! MLD: abs( tn - tn(10m) ) = ztem2 95 100 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ztm2 ! Top of thermocline: tn = tn(10m) - ztem2 … … 299 304 CALL iom_put( "28d", hd28 ) ! depth of the 28 isotherm 300 305 306 ! ---------------------------------------- ! 307 ! Average temp & salinity of first 300 m ! 308 ! Copied from the hc300 section below ! 309 ! ---------------------------------------- ! 310 ! find ilevel with (ilevel+1) the deepest W-level above 300m (we assume we can use e3t_0 to do this search...) 311 ilevel = 0 312 zthick_0 = 0._wp 313 DO jk = 1, jpkm1 314 zthick_0 = zthick_0 + e3t_1d(jk) 315 IF( zthick_0 < 300. ) ilevel = jk 316 END DO 317 ! surface boundary condition 318 IF( lk_vvl ) THEN ; zthick(:,:) = 0._wp ; tav3(:,:) = 0._wp ; sav3(:,:) = 0._wp 319 ELSE 320 ! For the surface layer calculate the integrated temp and salinity 321 ! The SSH "layer" is considered to be at the same temp/salinity as the 322 ! first ocean level. 323 zthick(:,:) = sshn(:,:) * tmask(:,:,1) 324 tav3(:,:) = tsn(:,:,1,jp_tem) * tmask(:,:,1) * zthick(:,:) 325 sav3(:,:) = tsn(:,:,1,jp_sal) * tmask(:,:,1) * zthick(:,:) 326 ENDIF 327 328 ! integration down to ilevel 329 ! For each level above 300m (1 to ilevel) calculate the integrated 330 ! temp and salinty (T|S * layer thickness), and sum the thickness 331 DO jk = 1, ilevel 332 zthick(:,:) = zthick(:,:) + fse3t(:,:,jk) * tmask(:,:,jk) 333 tav3 (:,:) = tav3 (:,:) + tsn(:,:,jk,jp_tem) * tmask(:,:,jk) * fse3t(:,:,jk) 334 sav3 (:,:) = sav3 (:,:) + tsn(:,:,jk,jp_sal) * tmask(:,:,jk) * fse3t(:,:,jk) 335 END DO 336 337 DO jj = 1, jpj 338 DO ji = 1, jpi 339 ! What distance is there remaining to get to 300m 340 depth_remain = 300.0 - zthick(ji,jj) 341 342 ! add the value of reamining thickness * T|S of the level beyond 343 ! 300m. 344 tav3(ji,jj) = tav3(ji,jj) + tsn(ji,jj,ilevel+1,jp_tem) * MIN( fse3t(ji,jj,ilevel+1), depth_remain ) & 345 * tmask(ji,jj,ilevel+1) 346 sav3(ji,jj) = sav3(ji,jj) + tsn(ji,jj,ilevel+1,jp_sal) * MIN( fse3t(ji,jj,ilevel+1), depth_remain ) & 347 * tmask(ji,jj,ilevel+1) 348 ! Add the remaining depth, this should take us to 300m (in most 349 ! places) 350 zthick(ji,jj) = zthick(ji,jj) + MIN( fse3t(ji,jj,ilevel+1), depth_remain ) * tmask(ji,jj,ilevel+1) 351 ! Divide by the depth to get the integrated temp|salinity 352 tav3(ji,jj) = tav3(ji,jj) / zthick(ji,jj) 353 sav3(ji,jj) = sav3(ji,jj) / zthick(ji,jj) 354 355 END DO 356 END DO 357 358 CALL iom_put( "tav300", tav3 ) ! first 300m average temperature 359 CALL iom_put( "sav300", sav3 ) ! first 300m average salinity 360 301 361 ! ----------------------------- ! 302 362 ! Heat content of first 300 m !
Note: See TracChangeset
for help on using the changeset viewer.