Ignore:
Timestamp:
Mar 29, 2023, 3:14:27 PM (18 months ago)
Author:
lguez
Message:

Sync latest trunk changes to branch LMDZ_ECRad

Location:
LMDZ6/branches/LMDZ_ECRad
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/LMDZ_ECRad

  • LMDZ6/branches/LMDZ_ECRad/libf/phylmd/phys_state_var_mod.F90

    r4143 r4482  
    489489      ! Ocean-air interface salinity minus bulk salinity, in ppt
    490490     
    491       !$OMP THREADPRIVATE(delta_sal, ds_ns, dt_ns, delta_sst)
     491      REAL, ALLOCATABLE, SAVE:: dter(:) ! (klon)
     492      ! Temperature variation in the diffusive microlayer, that is
     493      ! ocean-air interface temperature minus subskin temperature. In K.
     494
     495      REAL, SAVE, ALLOCATABLE:: dser(:) ! (klon)
     496      ! Salinity variation in the diffusive microlayer, that is
     497      ! ocean-air interface salinity minus subskin salinity. In ppt.
     498
     499      real, SAVE, ALLOCATABLE:: dt_ds(:) ! (klon)
     500      ! (tks / tkt) * dTer, in K
     501
     502      !$OMP THREADPRIVATE(delta_sal, ds_ns, dt_ns, delta_sst, dter, dser, dt_ds)
    492503
    493504    CONTAINS
     
    503514USE indice_sol_mod
    504515use config_ocean_skin_m, only: activate_ocean_skin
     516use surface_data, only: type_ocean
    505517IMPLICIT NONE
    506518
     
    560572      ALLOCATE(coefh(klon,klev+1,nbsrf+1))
    561573      ALLOCATE(coefm(klon,klev+1,nbsrf+1))
     574      ! initialize cleanly coefh,coefm
     575      ! (most of the time in the code these are assumed to be on klev levels)
     576      coefh(:,:,:)=0
     577      coefm(:,:,:)=0
    562578      ALLOCATE(zmax0(klon), f0(klon))
    563579      ALLOCATE(sig1(klon,klev), w01(klon,klev))
     
    722738        du_gwd_front(:,:) = 0 !ym missing init   
    723739      ENDIF
    724       if (activate_ocean_skin >= 1) ALLOCATE(delta_sal(klon), ds_ns(klon), &
    725            dt_ns(klon), delta_sst(klon))
     740
     741      if (activate_ocean_skin >= 1) then
     742         ALLOCATE(delta_sal(klon), ds_ns(klon), dt_ns(klon), delta_sst(klon), &
     743              dter(klon), dser(klon))
     744         if (activate_ocean_skin == 2 .and. type_ocean == "couple") &
     745              allocate(dt_ds(klon))
     746      end if
    726747
    727748    END SUBROUTINE phys_state_var_init
     
    733754USE indice_sol_mod
    734755use config_ocean_skin_m, only: activate_ocean_skin
     756use surface_data, only: type_ocean
    735757IMPLICIT NONE
    736758include "clesphys.h"
     
    861883      DEALLOCATE(ratqs_inter)
    862884
    863       if (activate_ocean_skin >= 1) deALLOCATE(delta_sal, ds_ns, dt_ns, &
    864            delta_sst)
     885      if (activate_ocean_skin >= 1) then
     886         deALLOCATE(delta_sal, ds_ns, dt_ns, delta_sst, dter, dser)
     887         if (activate_ocean_skin == 2 .and. type_ocean == "couple") &
     888              deALLOCATE(dt_ds)
     889      end if
    865890
    866891#ifdef ISO   
Note: See TracChangeset for help on using the changeset viewer.