Changeset 3267 for trunk/LMDZ.GENERIC


Ignore:
Timestamp:
Mar 13, 2024, 5:50:44 PM (8 months ago)
Author:
mturbet
Message:

second cleanup in hydrol.F90

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/hydrol.F90

    r3266 r3267  
    2828!     -------
    2929!     Calculate the surface hydrology and albedo changes.
     30!     Both for oceanic and continental regions
    3031!     
    3132!     Authors
     
    109110!$OMP THREADPRIVATE(firstcall)
    110111
    111      real :: runoffamount(ngrid)
     112      real :: runoffamount(ngrid)
    112113!#ifdef CPP_PARA
    113114      real :: runoffamount_glo(klon_glo)
     
    130131         call getin_p("activerunoff",activerunoff)
    131132         write(*,*)" activerunoff = ",activerunoff
    132          
    133          
    134133         
    135134         if (activerunoff) then
     
    197196      do ig = 1, ngrid
    198197
    199 !     Ocean
    200 !     -----
     198!     Ocean regions (rnat = 0)
     199!     -----------------------
    201200         if(nint(rnat(ig)).eq.0)then
    202201
    203 !     re-calculate oceanic albedo
     202!     Parameterization (not used for the moment) to compute the effect of solar zenith angle on the albedo
     203!     --------------------------
     204!
    204205!            if(diurnal.and.oceanalbvary)then
    205206!               fauxo      = ( 1.47 - ACOS( mu0(ig) ) )/0.15 ! where does this come from (Benjamin)?
     
    207208!               albedo(ig) = MAX(MIN(albedo(ig),0.60),0.04)
    208209!            else
    209                do nw=1,L_NSPECTV
    210                   albedo(ig,nw) = alb_ocean ! For now, alb_ocean is defined in inifis_mod.F90. Later we could introduce spectral dependency for alb_ocean.
    211                enddo
     210!
     211!               do nw=1,L_NSPECTV
     212!                  albedo(ig,nw) = alb_ocean ! For now, alb_ocean is defined in inifis_mod.F90. Later we could introduce spectral dependency for alb_ocean.
     213!              enddo
    212214!            end if
    213215
    214 
    215             if(ok_slab_ocean) then
     216            ! we first start by fixing the albedo of oceanic grid to that of the ocean
     217            do nw=1,L_NSPECTV
     218               albedo(ig,nw) = alb_ocean ! For now, alb_ocean is defined in inifis_mod.F90. Later we could introduce spectral dependency for alb_ocean.
     219            enddo
     220
     221            if(ok_slab_ocean) then ! if ocean heat transport param activated
    216222         
    217223               zfra = MAX(0.0,MIN(1.0,zqsurf(ig,iice)/45.0))     ! Snow Fraction (Critical height 45kg/m2~15cm)
     
    227233               ! Oceanic ice height, just for diagnostics
    228234               hice(ig)    = MIN(10.,sea_ice(ig)/rhowater)
    229             else !ok_slab_ocean
    230 
    231 
    232 !    calculate oceanic ice height including the latent heat of ice formation
    233 !    hice is the height of oceanic ice with a maximum of maxicethick.
     235            else !ok_slab_ocean ; here this is the case where we are dealing with a static ocean
     236
     237
     238               ! calculate oceanic ice height including the latent heat of ice formation
     239               ! hice is the height of oceanic ice with a maximum of maxicethick.
    234240               hice(ig)    = zqsurf(ig,iice)/rhowater ! update hice to include recent snowfall
    235 
    236 !              twater(ig)  = tsurf(ig) + ptimestep*zdtsurf(ig) &
    237                twater(ig)  = ztsurf(ig) - hice(ig)*RLFTT*rhowater/pcapcal(ig)
    238                ! this is temperature water would have if we melted entire ocean ice layer
     241               twater(ig)  = ztsurf(ig) - hice(ig)*RLFTT*rhowater/pcapcal(ig) ! this is the temperature water would have if we melted the entire ocean ice layer
    239242               hicebis(ig) = hice(ig)
    240243               hice(ig)    = 0.
     
    272275
    273276
    274 !     Continent
    275 !     ---------
     277!     Continental regions (rnat = 1)
     278!     -----------------------
    276279         elseif (nint(rnat(ig)).eq.1) then
    277280
    278 !    melt the snow
     281            ! melt the snow
    279282            if(ztsurf(ig).gt.T_h2O_ice_liq)then
    280283               if(zqsurf(ig,iice).gt.1.0e-8)then
     
    287290                  zqsurf(ig,iliq) = zqsurf(ig,iliq) + fsnoi
    288291
    289 !                thermal effects
     292                  ! thermal effects
    290293                  pdtsurf_hyd(ig) = -fsnoi*RLFTT/pcapcal(ig)/ptimestep 
    291294
     
    293296            else
    294297
    295 !    freeze the water
     298               ! freeze the water
    296299               if(zqsurf(ig,iliq).gt.1.0e-8)then
    297300
     
    304307                  zqsurf(ig,iliq) = zqsurf(ig,iliq) - fsnoi
    305308
    306 !                thermal effects
     309                  ! thermal effects
    307310                  pdtsurf_hyd(ig) = +fsnoi*RLFTT/pcapcal(ig)/ptimestep 
    308311
     
    310313            endif
    311314           
    312 !     deal with runoff
     315            ! add runoff (to simulate transport of water from continental regions to oceanic regions ; in practice, this prevents liquid water to build up too much on continental regions)
    313316            if(activerunoff)then
    314317               runoff(ig) = max(zqsurf(ig,iliq) - mx_eau_sol, 0.0)
     
    316319                  if(runoff(ig).ne.0.0)then
    317320                     zqsurf(ig,iliq) = mx_eau_sol
    318 !                    runoff is added to ocean at end
     321                    ! note: runoff is added to ocean at end
    319322                  endif
    320323               end if
     
    322325            endif
    323326
    324 !    re-calculate continental albedo
     327            ! re-calculate continental albedo
    325328            DO nw=1,L_NSPECTV
    326329               albedo(ig,nw) = albedo_bareground(ig)
     
    389392         enddo
    390393
    391 !    collect on the full grid
     394        ! collect on the full grid
    392395        call gather(runoffamount,runoffamount_glo)
    393396        call gather(zqsurf(1:ngrid,iliq),zqsurf_iliq_glo)
     
    416419        endif! is_master
    417420
    418 !    scatter the field back on all processes
     421        ! scatter the field back on all processes
    419422        call scatter(zqsurf_iliq_glo,zqsurf(1:ngrid,iliq))
    420423
Note: See TracChangeset for help on using the changeset viewer.