Changeset 3622 for LMDZ6/trunk


Ignore:
Timestamp:
Jan 15, 2020, 11:50:43 AM (5 years ago)
Author:
oboucher
Message:

Adding a diagnostics for the 100-m wind for estimating renewables

Location:
LMDZ6/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/DefLists/field_def_lmdz.xml

    r3553 r3622  
    6060        <field id="wind10m"    long_name="10-m wind speed"      unit="m/s" />
    6161        <field id="wind10max"  long_name="10m wind speed max"   unit="m/s" operation="maximum"/>
     62        <field id="wind100m"   long_name="100-m wind speed"      unit="m/s" />
    6263        <field id="sfcWindmax" field_ref="wind10m" operation="maximum" />
    6364        <field id="sicf"    long_name="Sea-ice fraction"        unit="-" />
  • LMDZ6/trunk/DefLists/file_def_histhf_lmdz.xml

    r3507 r3622  
    3333                <field field_ref="gusts" level="10" />
    3434                <field field_ref="wind10m" level="10" />
     35                <field field_ref="wind100m" level="10" />
    3536                <field field_ref="wind10max" level="10" operation="maximum" />
    3637                <field field_ref="sicf" level="10" />
  • LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90

    r3496 r3622  
    277277  TYPE(ctrl_out), SAVE :: o_wind10m = ctrl_out((/ 1, 1, 1, 10, 10, 10, 11, 11, 11, 11/), &
    278278    'wind10m', '10-m wind speed', 'm/s', (/ ('', i=1, 10) /))
     279  TYPE(ctrl_out), SAVE :: o_wind100m = ctrl_out((/ 1, 10, 10, 10, 10, 10, 11, 11, 11, 11/), &
     280    'wind100m', '100-m wind speed', 'm/s', (/ ('', i=1, 10) /))
    279281  TYPE(ctrl_out), SAVE :: o_wind10max = ctrl_out((/ 10, 1, 10, 10, 10, 10, 11, 11, 11, 11/), &
    280282    'wind10max', '10m wind speed max', 'm/s', &
  • LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90

    r3590 r3622  
    3939         o_t2m_min_mon, o_t2m_max_mon, &
    4040         o_q2m, o_ustar, o_u10m, o_v10m, &
    41          o_wind10m, o_wind10max, o_gusts, o_sicf, &
     41         o_wind10m, o_wind10max, o_wind100m, o_gusts, o_sicf, &
    4242         o_psol, o_mass, o_qsurf, o_qsol, &
    4343         o_precip, o_rain_fall, o_rain_con, o_ndayrain, o_plul, o_pluc, o_plun, &
     
    387387    USE tracinca_mod, ONLY: config_inca
    388388
     389    USE vertical_layers_mod, ONLY: presnivs
     390
    389391    IMPLICIT NONE
    390392
     
    428430    REAL, DIMENSION(klev,2) :: Ahyb_mid_bounds, Bhyb_mid_bounds
    429431    INTEGER :: ilev
     432    INTEGER, SAVE :: kmax_100m
     433!$OMP THREADPRIVATE(kmax_100m)
    430434#ifndef CPP_XIOS
    431435    REAL :: missing_val
     
    443447    LOGICAL, PARAMETER :: debug_strataer=.FALSE.
    444448#endif
     449    REAL,DIMENSION(klon,klev) :: z, dz
     450    REAL,DIMENSION(klon)      :: zrho, zt
    445451
    446452    ! On calcul le nouveau tau:
     
    458464    CALL wxios_set_context
    459465#endif
     466
     467    IF (.NOT.vars_defined) THEN
     468      kmax_100m=1
     469      DO k=1, klev-1
     470        IF (presnivs(k).GT.0.97*101325.) kmax_100m = k !--finding out max level for 100 m with a good margin
     471      ENDDO
     472    ENDIF
    460473
    461474    Ahyb_bounds(1,1) = 0.
     
    689702
    690703       CALL histwrite_phy(o_gusts, gustiness)
     704
     705       IF (vars_defined) THEN
     706          DO k = 1, kmax_100m                                      !--we could stop much lower
     707            zrho(:) = pplay(:,k)/t_seri(:,k)/RD                    ! air density in kg/m3
     708            dz(:,k) = (paprs(:,k)-paprs(:,k+1))/zrho(:)/RG         ! layer thickness in m
     709            IF (k==1) THEN
     710              z(:,1) = (paprs(:,1)-pplay(:,1))/zrho(:)/RG          ! altitude middle of first layer in m
     711              zt(:)  = dz(:,1)                                     ! altitude top of first layer in m
     712            ELSE
     713              z(:,k) = zt(:) + (paprs(:,k)-pplay(:,k))/zrho(:)/RG  ! altitude middle of layer k in m
     714              zt(:)  = zt(:) + dz(:,k)                             ! altitude top of layer k in m
     715            ENDIF
     716          ENDDO
     717          zx_tmp_fi2d(:)=missing_val
     718          DO k=1, kmax_100m-1                                      !--we could stop much lower
     719            DO i=1,klon
     720              IF (z(i,k).LT.100..AND.z(i,k+1).GE.100.) THEN
     721                zx_tmp_fi2d(i)=SQRT( (u_seri(i,k)+(100.-z(i,k))/(z(i,k+1)-z(i,k))*(u_seri(i,k+1)-u_seri(i,k)))**2.0 + &
     722                                     (v_seri(i,k)+(100.-z(i,k))/(z(i,k+1)-z(i,k))*(v_seri(i,k+1)-v_seri(i,k)))**2.0 )
     723              ENDIF
     724            ENDDO
     725          ENDDO
     726       ENDIF
     727       CALL histwrite_phy(o_wind100m, zx_tmp_fi2d)
    691728
    692729       IF (vars_defined) THEN
Note: See TracChangeset for help on using the changeset viewer.