Ignore:
Timestamp:
Oct 25, 2023, 10:34:54 AM (15 months ago)
Author:
bhatnags
Message:

Generic-PCM

This commit updates the slab ocean module to a parallelisable dynamic slab ocean module. This is particularly relevant if you want to be able to use oceanic heat transport in parallel mode.

It has the following features:

(a) Computes sea ice creation and evolution.
(b) Snow has thermodynamic properties.
(c) Computes oceanic horizontal transport (diffusion & surface-wind driven Ekman transport).
(d) Can be used in parallel mode.

Required callphys.def flags:
The slab ocean and its dependencies can be activated with the following flags (already added to deftank):
## Ocean options
## ~
# Model slab-ocean (Main flag for slab ocean)
ok_slab_ocean = .true.
# The following flags can only be set to true if ok_slab_ocean is true
# Ekman transport
slab_ekman = .true.
# Ekman zonal advection
slab_ekman_zonadv = .true.
# Horizontal diffusion (default coef_hdiff=25000., can be changed)
slab_hdiff = .true.
# Slab-ocean timestep (in physics timesteps)
cpl_pas = 1
# Gent-McWilliams? Scheme (can only be true if slab_ekman is true)
slab_gm = .true.

Notes:
In the current state, the model crashes if moistadjustment = .true. Unsure whether this is due to the slab or is an inherent issue with moistadj (under investigation).

SB and EM

Location:
trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/ini_archive.F

    r1478 r3100  
    3636
    3737      USE comsoil_h
    38       USE slab_ice_h, only: noceanmx
     38!      USE slab_ice_h, only: noceanmx
     39      USE ocean_slab_mod, ONLY: nslay
    3940!      use control_mod
    4041      USE comvert_mod, ONLY: ap,bp,aps,bps,presnivs,pseudoalt
     
    8182      INTEGER idim_tim
    8283      INTEGER idim_nsoilmx ! "subsurface_layers" dimension ID #
    83       INTEGER idim_noceanmx ! "ocean_layers" dimension ID #
     84      INTEGER idim_nslay ! "ocean_layers" dimension ID #
    8485      INTEGER nid,nvarid
    8586      real sig_s(llm),s(llm)
     
    164165      ierr = NF_DEF_DIM (nid, "altitude", llm, idim_llm)
    165166      ierr = NF_DEF_DIM (nid,"subsurface_layers",nsoilmx,idim_nsoilmx)
    166       ierr = NF_DEF_DIM (nid,"ocean_layers",noceanmx,idim_noceanmx)
     167      ierr = NF_DEF_DIM (nid,"ocean_layers",nslay,idim_nslay)
    167168
    168169      ierr = NF_DEF_DIM (nid,"index", length, idim_index)
  • trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/iniphysiq_mod.F90

    r1682 r3100  
    1111
    1212use control_mod, only: nday
    13 use surf_heat_transp_mod, only: ini_surf_heat_transp
     13!use surf_heat_transp_mod, only: ini_surf_heat_transp
     14USE slab_heat_transp_mod, ONLY: ini_slab_transp_geom
    1415use infotrac, only : nqtot ! number of advected tracers
    1516use planete_mod, only: ini_planete_mod
     
    8384call getin_p("ok_slab_ocean",ok_slab_ocean)
    8485if (ok_slab_ocean) then
    85   call ini_surf_heat_transp(ip1jm,ip1jmp1,unsairez,fext,unsaire, &
    86                             cu,cuvsurcv,cv,cvusurcu,aire,apoln,apols, &
    87                             aireu,airev)
     86!  call ini_surf_heat_transp(ip1jm,ip1jmp1,unsairez,fext,unsaire, &
     87!                            cu,cuvsurcv,cv,cvusurcu,aire,apoln,apols, &
     88!                            aireu,airev)
     89   CALL ini_slab_transp_geom(ip1jm,ip1jmp1,unsairez,fext,unsaire,&
     90                                  cu,cuvsurcv,cv,cvusurcu, &
     91                                  aire,apoln,apols, &
     92                                  aireu,airev,rlatvdyn)
    8893endif
    8994
  • trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/lect_start_archive.F

    r2484 r3100  
    99      USE tracer_h, ONLY: igcm_co2_ice
    1010      USE infotrac, ONLY: tname, nqtot
    11       USE slab_ice_h, ONLY: noceanmx
     11!      USE slab_ice_h, ONLY: noceanmx
     12      USE ocean_slab_mod, ONLY: nslay
    1213      USE callkeys_mod, ONLY: ok_slab_ocean
    1314      USE comvert_mod, ONLY: ap,bp,aps,bps,preff
     
    6869      REAL,INTENT(OUT) :: emis(ngrid)
    6970      REAL,INTENT(OUT) :: q2(ngrid,llm+1),qsurf(ngrid,nqtot)
    70       REAL,INTENT(OUT) :: tslab(ngrid,noceanmx)
     71      REAL,INTENT(OUT) :: tslab(ngrid,nslay)
    7172      REAL ,INTENT(OUT) ::rnat(ngrid),pctsrf_sic(ngrid)
    7273      REAL,INTENT(OUT) :: tsea_ice(ngrid),sea_ice(ngrid)
     
    9899      real emisS(iip1,jjp1)
    99100      REAL q2S(iip1,jjp1,llm+1),qsurfS(iip1,jjp1,nqtot)
    100       real tslabS(iip1,jjp1,noceanmx)
     101      real tslabS(iip1,jjp1,nslay)
    101102      real pctsrf_sicS(iip1,jjp1),tsea_iceS(iip1,jjp1)
    102103      real rnatS(iip1,jjp1), sea_iceS(iip1,jjp1)
     
    287288      allocate(mlayerold(nsoilold))
    288289      allocate(qsurfold(imold+1,jmold+1,nqtot))
    289       allocate(tslabold(imold+1,jmold+1,noceanmx))
     290      allocate(tslabold(imold+1,jmold+1,nslay))
    290291      allocate(rnatold(imold+1,jmold+1))
    291292      allocate(pctsrf_sicold(imold+1,jmold+1))
     
    684685      if(ok_slab_ocean) then
    685686      start=(/1,1,1,memo/)
    686       count=(/imold+1,jmold+1,noceanmx,1/)
     687      count=(/imold+1,jmold+1,nslay,1/)
    687688
    688689       ierr=NF_INQ_VARID(nid,"tslab",nvarid)
     
    12981299c 6.3   Slab Ocean :
    12991300c-----------------------------------------------------------------------
    1300       call interp_horiz (tslabold,tslabs,imold,jmold,iim,jjm,noceanmx,
    1301      &                   rlonuold,rlatvold,rlonu,rlatv)
    1302       call gr_dyn_fi (noceanmx,iim+1,jjm+1,ngrid,tslabs,tslab)
     1301      call interp_horiz (tslabold,tslabs,imold,jmold,iim,jjm,nslay,
     1302     &                   rlonuold,rlatvold,rlonu,rlatv)
     1303      call gr_dyn_fi (nslay,iim+1,jjm+1,ngrid,tslabs,tslab)
    13031304
    13041305      call interp_horiz (rnatold,rnats,imold,jmold,iim,jjm,1,
  • trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/newstart.F

    r2785 r3100  
    3030      use phyredem, only: physdem0, physdem1
    3131      use iostart, only: open_startphy
    32       use slab_ice_h, only:noceanmx
     32!      use slab_ice_h, only:noceanmx
     33      USE ocean_slab_mod, ONLY: nslay
    3334      use filtreg_mod, only: inifilr
    3435      USE mod_const_mpi, ONLY: COMM_LMDZ
  • trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/start2archive.F

    r2785 r3100  
    2222      USE comsoil_h
    2323     
    24       use slab_ice_h, only: noceanmx
     24!      use slab_ice_h, only: noceanmx
     25      USE ocean_slab_mod, ONLY: nslay
    2526      USE ioipsl_getincom, only: getin
    2627      USE planete_mod, only: year_day
     
    8485!     added by BC for slab ocean
    8586      REAL rnat(ngridmx),pctsrf_sic(ngridmx),sea_ice(ngridmx)
    86       REAL tslab(ngridmx,noceanmx),tsea_ice(ngridmx)
     87      REAL, ALLOCATABLE :: tslab(:,:)
     88      REAL tsea_ice(ngridmx)
    8789
    8890
     
    104106!     added by BC for slab ocean
    105107      REAL rnatS(ip1jmp1),pctsrf_sicS(ip1jmp1),sea_iceS(ip1jmp1)
    106       REAL tslabS(ip1jmp1,noceanmx),tsea_iceS(ip1jmp1)
     108      REAL, ALLOCATABLE :: tslabS(:,:)
     109      REAL tsea_iceS(ip1jmp1)
    107110
    108111!     For non-orographic GW
     
    156159      allocate(qsurf(ngridmx,nqtot))
    157160      allocate(qsurfS(ip1jmp1,nqtot))
     161      allocate(tslab(ngridmx,nslay)) !Added by SB for slab ocean
     162      allocate(tslabS(ip1jmp1,nslay)) !Added by SB for slab ocean
    158163! other array allocations:
    159164!      call ini_comsoil_h(ngridmx) ! done via iniphysiq
     
    356361      call gr_fi_dyn(1,ngridmx,iip1,jjp1,tsea_ice,tsea_iceS)
    357362      call gr_fi_dyn(1,ngridmx,iip1,jjp1,sea_ice,sea_iceS)
    358       call gr_fi_dyn(noceanmx,ngridmx,iip1,jjp1,tslab,tslabS)
     363      call gr_fi_dyn(nslay,ngridmx,iip1,jjp1,tslab,tslabS)
    359364
    360365      call gr_fi_dyn(llm,ngridmx,iip1,jjp1,du_nonoro_gwd,du_nonoro_gwdS)
  • trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/write_archive.F

    r2336 r3100  
    3333
    3434      use comsoil_h, only: nsoilmx
    35       use slab_ice_h, only: noceanmx
     35!      use slab_ice_h, only: noceanmx
     36      USE ocean_slab_mod, ONLY: nslay
    3637
    3738      implicit none
     
    195196        edges(1)=iip1
    196197        edges(2)=jjp1
    197         edges(3)=noceanmx
     198        edges(3)=nslay
    198199        edges(4)=1
    199200#ifdef NC_DOUBLE
Note: See TracChangeset for help on using the changeset viewer.