source: trunk/LMDZ.GENERIC/libf/dynphy_lonlat/phystd/iniphysiq_mod.F90

Last change on this file was 3100, checked in by bhatnags, 14 months ago

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

File size: 3.9 KB
Line 
1MODULE iniphysiq_mod
2
3CONTAINS
4
5subroutine iniphysiq(ii,jj,nlayer, &
6                     nbp, communicator, &
7                     punjours, pdayref,ptimestep, &
8                     rlatudyn,rlatvdyn,rlonudyn,rlonvdyn, &
9                     airedyn,cudyn,cvdyn, &
10                     prad,pg,pr,pcpp,iflag_phys)
11
12use control_mod, only: nday
13!use surf_heat_transp_mod, only: ini_surf_heat_transp
14USE slab_heat_transp_mod, ONLY: ini_slab_transp_geom
15use infotrac, only : nqtot ! number of advected tracers
16use planete_mod, only: ini_planete_mod
17USE comvert_mod, ONLY: ap,bp,preff
18use inifis_mod, only: inifis
19use ioipsl_getin_p_mod, only: getin_p
20
21use inigeomphy_mod, only: inigeomphy
22use geometry_mod, only: cell_area, & ! physics grid area (m2)
23                        longitude, & ! longitudes (rad)
24                        latitude ! latitudes (rad)
25! necessary to get klon_omp
26USE mod_phys_lmdz_para, ONLY: klon_omp ! number of columns (on local omp grid)
27USE dimphy, ONLY: init_dimphy
28
29implicit none
30include "dimensions.h"
31include "paramet.h"
32include "comgeom.h"
33include "iniprint.h"
34
35real,intent(in) :: prad ! radius of the planet (m)
36real,intent(in) :: pg ! gravitational acceleration (m/s2)
37real,intent(in) :: pr ! ! reduced gas constant R/mu
38real,intent(in) :: pcpp ! specific heat Cp
39real,intent(in) :: punjours ! length (in s) of a standard day
40integer,intent(in) :: nlayer ! number of atmospheric layers
41integer,intent(in) :: ii ! number of atmospheric coulumns along longitudes
42integer,intent(in) :: jj  ! number of atompsheric columns along latitudes
43integer,intent(in) :: nbp ! number of physics columns for this MPI process
44integer,intent(in) :: communicator ! MPI communicator
45real,intent(in) :: rlatudyn(jj+1) ! latitudes of the physics grid
46real,intent(in) :: rlatvdyn(jj) ! latitude boundaries of the physics grid
47real,intent(in) :: rlonvdyn(ii+1) ! longitudes of the physics grid
48real,intent(in) :: rlonudyn(ii+1) ! longitude boundaries of the physics grid
49real,intent(in) :: airedyn(ii+1,jj+1) ! area of the dynamics grid (m2)
50real,intent(in) :: cudyn((ii+1)*(jj+1)) ! cu coeff. (u_covariant = cu * u)
51real,intent(in) :: cvdyn((ii+1)*jj) ! cv coeff. (v_covariant = cv * v)
52integer,intent(in) :: pdayref ! reference day of for the simulation
53real,intent(in) :: ptimestep !physics time step (s)
54integer,intent(in) :: iflag_phys ! type of physics to be called
55
56logical :: ok_slab_ocean
57
58  ! the common part for all planetary physics
59  !------------------------------------------
60  ! --> initialize physics distribution, global fields and geometry
61  ! (i.e. things in phy_common or dynphy_lonlat)
62  CALL inigeomphy(ii,jj,nlayer, &
63               nbp, communicator, &
64               rlatudyn,rlatvdyn, &
65               rlonudyn,rlonvdyn, &
66               airedyn,cudyn,cvdyn)
67
68  ! the distinct part for all planetary physics (ie. things in phystd)
69  !------------------------------------------
70
71!$OMP PARALLEL
72
73! copy some fundamental parameters to physics
74! and do some initializations
75
76! Initialize dimphy module => Now done in physics_distribution_mod
77! call init_dimphy(klon_omp,nlayer)
78
79! copy over preff , ap() and bp()
80call ini_planete_mod(nlayer,preff,ap,bp)
81
82! for slab ocean, copy over some arrays
83ok_slab_ocean=.false. ! default value
84call getin_p("ok_slab_ocean",ok_slab_ocean)
85if (ok_slab_ocean) then
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)
93endif
94
95call inifis(klon_omp,nlayer,nqtot,pdayref,punjours,nday,ptimestep, &
96            latitude,longitude,cell_area,prad,pg,pr,pcpp)
97
98
99!$OMP END PARALLEL
100
101end subroutine iniphysiq
102
103
104END MODULE iniphysiq_mod
Note: See TracBrowser for help on using the repository browser.