- Timestamp:
- Apr 15, 2014, 4:57:48 PM (11 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 2 added
- 1 deleted
- 23 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r1208 r1224 1948 1948 before such a GCM run, although 'q=profile' could be used too. 1949 1949 1950 == 13/11/2013 == AS 1951 --> Added precompiling flag MESOSCALE around pressure modifications 1952 done in revision 883. This makes the mesoscale model become crazy. 1953 1950 1954 == 20/11/2013 == EM 1951 1955 - Correction: in physiq.F, move newcondens (CO2 condensation routine) so that … … 2012 2016 Modified accordingly startfi and start_archive writing and reading routines. 2013 2017 2014 2018 == 24/03/2014 == AS 2019 --> fixed a potential bug in thermal plume model because zlmax was computed both in thermcell_main_mars and calltherm_interface... so made it an OUT argument 2020 of calltherm_interface. also: changed the name to limz. and added precompiling flags to avoid the use of planetwide in MESOSCALE. in MESOSCALE we just go hi 2021 gh enough (nlayer-5) and do not care about computational cost (although we certainly gain from not using MAXVAL). 2022 --> moved allocations upward in inifis. does not change anything for GCM, but make MESOSCALE modifications simpler, and overall make inifis better organized: 2023 first allocations, then reading callphys.def file. 2024 --> added precompiling flags around lines that are both useless for MESOSCALE (notably I/O) and recently adapted to parallel computations in the GCM 2025 --> tidied up what is MESOSCALE vs. GCM in surfini 2026 -
trunk/LMDZ.MARS/libf/phymars/aeropacity.F
r1208 r1224 6 6 USE ioipsl_getincom, only: getin 7 7 use tracer_mod, only: noms, igcm_h2o_ice, igcm_dust_mass, 8 & igcm_dust_submicron, rho_dust, rho_ice 9 use comgeomfi_h, only: lati ! grid point latitudes (rad) 8 & igcm_dust_submicron, rho_dust, rho_ice, 9 & nqdust 10 use comgeomfi_h, only: lati, sinlat ! grid point latitudes (rad) 10 11 use yomaer_h, only: tauvis 11 12 IMPLICIT NONE … … 111 112 ! Qabs instead of Qext 112 113 ! (direct comparison with TES) 114 REAL topdust0(ngrid) 113 115 114 116 c local saved variables 115 117 c --------------------- 116 117 REAL,SAVE,ALLOCATABLE :: topdust0(:)118 118 119 119 c Level under which the dust mixing ratio is held constant … … 126 126 127 127 ! indexes of water ice and dust tracers: 128 INTEGER,ALLOCATABLE,SAVE :: nqdust(:) ! to store the indexes of dust tracers129 128 INTEGER,SAVE :: i_ice=0 ! water ice 130 129 real,parameter :: odpref=610. ! DOD reference pressure (Pa) … … 140 139 141 140 IF (firstcall) THEN 142 ! allocate local saved arrays143 allocate(nqdust(nq))144 allocate(topdust0(ngrid))145 146 141 ! identify scatterers that are dust 147 142 naerdust=0 … … 167 162 write(*,*) "aeropacity: i_ice=",i_ice 168 163 ENDIF 169 170 c altitude of the top of the aerosol layer (km) at Ls=2.76rad:171 c in the Viking year scenario172 DO ig=1,ngrid173 topdust0(ig)=60. -22.*SIN(lati(ig))**2174 END DO175 164 176 165 c typical profile of solsir and (1-w)^(-1): … … 295 284 else if (iddist.eq.2) then ! "Viking" scenario 296 285 do ig=1,ngrid 286 ! altitude of the top of the aerosol layer (km) at Ls=2.76rad: 287 ! in the Viking year scenario 288 topdust0(ig)=60. -22.*sinlat(ig)**2 297 289 topdust(ig)=topdust0(ig)+18.*zlsconst 298 290 end do -
trunk/LMDZ.MARS/libf/phymars/comgeomfi_h.F90
r1130 r1224 4 4 implicit none 5 5 6 ! These arrays are allocated in inifis6 ! These arrays are allocated in phys_state_var_init 7 7 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: long ! longitudes (rad) 8 8 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: lati ! latitudes (rad) 9 9 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: area ! mesh area (m2) 10 10 REAL,SAVE :: totarea 11 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sinlon 12 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: coslon 13 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: sinlat 14 REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: coslat 15 16 contains 17 18 subroutine ini_comgeomfi_h(ngrid) 19 20 implicit none 21 integer,intent(in) :: ngrid ! number of atmospheric columns 22 23 allocate(lati(ngrid)) 24 allocate(long(ngrid)) 25 allocate(area(ngrid)) 26 27 end subroutine ini_comgeomfi_h 28 29 subroutine ini_sincosgeom(ngrid) 30 31 implicit none 32 integer,intent(in) :: ngrid ! number of atmospheric columns 33 integer :: ig 34 35 if (.not.allocated(lati)) then 36 PRINT*,"lati not allocated. did you run ini_comgeomfi_h?" 37 STOP 38 endif 39 40 allocate(sinlat(ngrid)) 41 allocate(coslat(ngrid)) 42 allocate(sinlon(ngrid)) 43 allocate(coslon(ngrid)) 44 DO ig=1,ngrid 45 sinlat(ig)=sin(lati(ig)) 46 coslat(ig)=cos(lati(ig)) 47 sinlon(ig)=sin(long(ig)) 48 coslon(ig)=cos(long(ig)) 49 ENDDO 50 end subroutine ini_sincosgeom 11 51 12 52 end module comgeomfi_h -
trunk/LMDZ.MARS/libf/phymars/comsoil_h.F90
r1047 r1224 14 14 ! soil_settings.F) 15 15 16 ! variables 17 REAL,SAVE,ALLOCATABLE :: tsoil(:,:) ! sub-surface temperatures (K) 18 real,save,allocatable :: mthermdiff(:,:) ! mid-layer thermal diffusivity 19 real,save,allocatable :: thermdiff(:,:) ! inter-layer thermal diffusivity 20 real,save,allocatable :: coefq(:) ! q_{k+1/2} coefficients 21 real,save,allocatable :: coefd(:,:) ! d_k coefficients 22 real,save,allocatable :: alph(:,:) ! alpha_k coefficients 23 real,save,allocatable :: beta(:,:) ! beta_k coefficients 24 real,save :: mu 25 16 26 contains 17 27 … … 24 34 allocate(mlayer(0:nsoilmx-1)) ! soil mid-layer depths 25 35 allocate(inertiedat(ngrid,nsoilmx)) ! soil thermal inertia 26 36 37 allocate(tsoil(ngrid,nsoilmx)) ! soil temperatures 38 39 allocate(mthermdiff(ngrid,0:nsoilmx-1)) 40 allocate(thermdiff(ngrid,nsoilmx-1)) 41 allocate(coefq(0:nsoilmx-1)) 42 allocate(coefd(ngrid,nsoilmx-1)) 43 allocate(alph(ngrid,nsoilmx-1)) 44 allocate(beta(ngrid,nsoilmx-1)) 45 46 27 47 end subroutine ini_comsoil_h 28 48 -
trunk/LMDZ.MARS/libf/phymars/conf_phys.F
r1223 r1224 1 SUBROUTINE inifis(2 $ n grid,nlayer,nq1 SUBROUTINE conf_phys( 2 $ nq 3 3 $ ,day_ini,pdaysec,ptimestep 4 $ ,plat,plon,parea5 4 $ ,prad,pg,pr,pcpp 6 5 #ifdef MESOSCALE … … 25 24 ! E.M. (june 2009) use getin routine to load parameters 26 25 ! adapted to the mesoscale use - Aymeric Spiga - 01/2007-07/2011 26 ! separated inifis into conf_phys and phys_state_var_init (A. Spiga) 27 27 ! 28 28 ! … … 33 33 ! ------ 34 34 ! 35 ! ngrid Size of the horizontal grid. 36 ! All internal loops are performed on that grid. 37 ! nlayer Number of vertical layers. 35 ! nq Number of tracers 38 36 ! pdayref Day of reference for the simulation 39 37 ! pday Number of days counted from the North. Spring … … 48 46 USE ioipsl_getincom, only : getin 49 47 use tracer_mod, only : nqmx, nuice_sed, ccn_factor 50 use comsoil_h, only: ini_comsoil_h 51 use comgeomfi_h, only: long, lati, area, totarea 52 use comdiurn_h, only: sinlat, coslat, sinlon, coslon 53 use surfdat_h, only: ini_surfdat_h, albedo_h2o_ice, inert_h2o_ice, 48 use surfdat_h, only: albedo_h2o_ice, inert_h2o_ice, 54 49 & frost_albedo_threshold 55 use comsaison_h, only: ini_comsaison_h 56 use slope_mod, only: ini_slope_mod 57 use dimradmars_mod, only: ini_dimradmars_mod 58 use yomaer_h,only: ini_yomaer_h, tauvis 59 use yomlw_h, only: ini_yomlw_h 60 use conc_mod, only: ini_conc_mod 50 use yomaer_h,only: tauvis 61 51 use control_mod, only: ecritphy 62 52 … … 71 61 use comsoil_h, only: volcapa !!MESOSCALE -- needed to fill volcapa 72 62 #endif 73 74 63 75 64 IMPLICIT NONE … … 98 87 99 88 REAL,INTENT(IN) :: ptimestep 100 INTEGER,INTENT(IN) :: day_ini 101 102 INTEGER,INTENT(IN) :: ngrid,nlayer,nq 103 REAL,INTENT(IN) :: plat(ngrid),plon(ngrid),parea(ngrid) 89 INTEGER,INTENT(IN) :: nq,day_ini 104 90 INTEGER ig,ierr 105 106 ! EXTERNAL iniorbit,orbite107 EXTERNAL SSUM108 REAL SSUM109 91 110 92 CHARACTER ch1*12 … … 117 99 118 100 119 !!! 1. ALLOCATIONS120 !!! --------------121 122 ! allocate "slope_mod" arrays123 call ini_slope_mod(ngrid)124 125 ! allocate "comsaison_h" arrays126 call ini_comsaison_h(ngrid)127 128 ! allocate "surfdat_h" arrays129 call ini_surfdat_h(ngrid)130 131 ! allocate "comgeomfi_h" arrays132 allocate(lati(ngrid))133 allocate(long(ngrid))134 allocate(area(ngrid))135 136 ! fill "comgeomfi_h" data137 CALL SCOPY(ngrid,plon,1,long,1)138 CALL SCOPY(ngrid,plat,1,lati,1)139 CALL SCOPY(ngrid,parea,1,area,1)140 totarea=SSUM(ngrid,area,1)141 142 ! allocate "comdiurn_h" data143 allocate(sinlat(ngrid))144 allocate(coslat(ngrid))145 allocate(sinlon(ngrid))146 allocate(coslon(ngrid))147 148 ! fill "comdiurn_h" data149 DO ig=1,ngrid150 sinlat(ig)=sin(plat(ig))151 coslat(ig)=cos(plat(ig))152 sinlon(ig)=sin(plon(ig))153 coslon(ig)=cos(plon(ig))154 ENDDO155 156 101 pi=2.*asin(1.) ! NB: pi is a common in comcstfi.h 157 158 ! allocate "comsoil_h" arrays159 call ini_comsoil_h(ngrid)160 161 ! set some variables in "dimradmars_mod"162 call ini_dimradmars_mod(ngrid,nlayer)163 164 ! allocate arrays in "yomaer_h"165 call ini_yomaer_h166 167 ! allocate arrays in "yomlw_h"168 call ini_yomlw_h(ngrid)169 170 ! allocate arrays in "conc_mod"171 call ini_conc_mod(ngrid,nlayer)172 173 174 !!! 2. SETTINGS and CONSTANTS175 !!! -------------------------176 102 177 103 rad=prad … … 189 115 #include "meso_inc/meso_inc_inifisini.F" 190 116 #endif 191 192 ! --------------------------------------------------------193 ! The usual Tests194 ! --------------195 ! IF (nlayer.NE.nlayermx) THEN196 ! PRINT*,'STOP in inifis'197 ! PRINT*,'Probleme de dimensions :'198 ! PRINT*,'nlayer = ',nlayer199 ! PRINT*,'nlayermx = ',nlayermx200 ! STOP201 ! ENDIF202 117 203 118 ! read in 'ecritphy' (frequency of calls to physics, in dynamical steps) … … 218 133 PRINT* 219 134 PRINT*,'--------------------------------------------' 220 PRINT*,' inifis: Parameters for the physics (callphys.def)'135 PRINT*,' conf_phys: Parameters for the physics (callphys.def)' 221 136 PRINT*,'--------------------------------------------' 222 137 … … 789 704 790 705 PRINT* 791 PRINT*,' inifis: daysec',daysec706 PRINT*,'conf_phys: daysec',daysec 792 707 PRINT* 793 PRINT*,' inifis: The radiative transfer is computed:'708 PRINT*,'conf_phys: The radiative transfer is computed:' 794 709 PRINT*,' each ',iradia,' physical time-step' 795 710 PRINT*,' or each ',iradia*dtphys,' seconds' … … 817 732 . ,iostat=ierr) 818 733 IF(ierr.EQ.0) THEN 819 write(*,*) ' inifis: Reading radia.def !!!'734 write(*,*) 'conf_phys: Reading radia.def !!!' 820 735 READ(99,fmt='(a)') ch1 821 736 READ(99,*) callemis -
trunk/LMDZ.MARS/libf/phymars/datafile.h
r79 r1224 5 5 COMMON/datadirectory/datafile 6 6 character (len=100) :: datafile 7 ! NB: default value for 'datafile' is set in inifis.F7 ! NB: default value for 'datafile' is set in conf_phys.F 8 8 !----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/dimradmars_mod.F90
r1112 r1224 1 1 module dimradmars_mod 2 2 ! Declaration and settings for radiative transfer calculations 3 ! Initializations and allocations are done in inifis3 ! Initializations and allocations are done in phys_state_var_init 4 4 implicit none 5 5 ! nflev: number of vertical layer … … 72 72 integer,parameter :: nt_pademx=19 73 73 74 !! 75 !! variables 76 !! 77 REAL,SAVE,ALLOCATABLE :: dtrad(:,:) ! Net atm. radiative heating rate (K.s-1) 78 REAL,SAVE,ALLOCATABLE :: fluxrad_sky(:) ! rad. flux from sky absorbed by surface (W.m-2) 79 REAL,SAVE,ALLOCATABLE :: fluxrad(:) ! Net radiative surface flux (W.m-2) 80 REAL,SAVE,ALLOCATABLE :: albedo(:,:) ! Surface albedo in each solar band 81 REAL,SAVE,ALLOCATABLE :: tauscaling(:) ! Convertion factor for qdust and Ndust 82 ! aerosol (dust or ice) extinction optical depth at reference wavelength 83 ! "longrefvis" set in dimradmars_mod , for one of the "naerkind" kind of 84 ! aerosol optical properties : 85 REAL,SAVE,ALLOCATABLE :: aerosol(:,:,:) 86 REAL,SAVE,ALLOCATABLE :: nueffdust(:,:) ! Dust effective variance 87 74 88 contains 75 89 … … 80 94 integer,intent(in) :: ngrid ! number of atmospheric columns 81 95 integer,intent(in) :: nlayer ! number of atmospheric layers 82 96 83 97 nflev=nlayer 84 98 ! ndomainsz=ngrid … … 88 102 ndlo2=ndlon 89 103 104 allocate(albedo(ngrid,2)) 105 allocate(dtrad(ngrid,nlayer)) 106 allocate(fluxrad_sky(ngrid)) 107 allocate(fluxrad(ngrid)) 108 allocate(tauscaling(ngrid)) 109 allocate(aerosol(ngrid,nlayer,naerkind)) 110 allocate(nueffdust(ngrid,nlayer)) 111 90 112 end subroutine ini_dimradmars_mod 91 113 -
trunk/LMDZ.MARS/libf/phymars/iniphysiq.F90
r1130 r1224 69 69 ! copy some fundamental parameters to physics 70 70 ! and do some initializations 71 call inifis(klon_omp,nlayer,nqtot,pdayref,punjours,ptimestep, &72 rlatd,rlond,airephy,prad,pg,pr,pcpp)71 call phys_state_var_init(klon_omp,nlayer,nqtot,rlatd,rlond,airephy) 72 call conf_phys(nqtot,pdayref,punjours,ptimestep,prad,pg,pr,pcpp) 73 73 74 74 !$OMP END PARALLEL -
trunk/LMDZ.MARS/libf/phymars/initracer.F
r1130 r1224 1 SUBROUTINE initracer(ngrid,nq,qsurf ,co2ice)1 SUBROUTINE initracer(ngrid,nq,qsurf) 2 2 3 3 #ifndef MESOSCALE … … 39 39 integer,intent(in) :: nq ! number of tracers 40 40 real,intent(out) :: qsurf(ngrid,nq) ! tracer on surface (e.g. kg.m-2) 41 real,intent(out) :: co2ice(ngrid) ! co2 ice mass on surface (e.g. kg.m-2)42 41 43 42 integer iq,ig,count … … 68 67 allocate(alpha_lift(nq)) 69 68 allocate(alpha_devil(nq)) 70 allocate(dryness(ngrid))71 69 allocate(igcm_dustbin(nq)) 70 allocate(nqdust(nq)) 72 71 73 72 #ifndef MESOSCALE -
trunk/LMDZ.MARS/libf/phymars/newcondens.F
r1130 r1224 145 145 LOGICAL condsub(ngrid) 146 146 147 real :: emisref(ngrid) 148 147 149 c variable speciale diagnostique 148 150 real tconda1(ngrid,nlayer) … … 164 166 integer,save :: ico2 ! index of CO2 tracer 165 167 real,save :: qco2min,qco2,mmean 166 real,allocatable,save :: emisref(:)167 168 real,parameter :: latcond=5.9e5 ! (J/kg) Latent heat of solid CO2 ice 168 169 real,parameter :: tcond1mb=136.27 ! condensation temperature (K) at 1 mbar … … 182 183 c 183 184 IF (firstcall) THEN 184 185 allocate(emisref(ngrid))186 185 187 186 bcond=1./tcond1mb -
trunk/LMDZ.MARS/libf/phymars/newstart.F
r1208 r1224 383 383 ! (for instance initracer needs to know about some flags, and/or 384 384 ! 'datafile' path may be changed by user) 385 call inifis(ngridmx,llm,nqtot,day_ini,daysec,dtphys,386 & latfi,lonfi,airefi,rad,g,r,cpp)385 call phys_state_var_init(ngridmx,llm,nqtot,latfi,lonfi,airefi) 386 call conf_phys(nqtot,day_ini,daysec,dtphys,rad,g,r,cpp) 387 387 388 388 c======================================================================= … … 484 484 485 485 ! initialize tracer names noms(:) and indexes (igcm_co2, igcm_h2o_vap, ...) 486 call initracer(ngridmx,nqtot,qsurf ,co2ice)486 call initracer(ngridmx,nqtot,qsurf) 487 487 488 488 if (count.eq.nqtot) then -
trunk/LMDZ.MARS/libf/phymars/nirco2abs.F
r1047 r1224 3 3 4 4 use tracer_mod, only: igcm_co2, igcm_o 5 use com diurn_h, only: sinlon, coslon, sinlat, coslat5 use comgeomfi_h, only: sinlon, coslon, sinlat, coslat 6 6 IMPLICIT NONE 7 7 c======================================================================= -
trunk/LMDZ.MARS/libf/phymars/physiq.F
r1212 r1224 18 18 & nuice_ref, rho_ice, rho_dust, ref_r0 19 19 use comsoil_h, only: inertiedat, ! soil thermal inertia 20 & nsoilmx ! number of subsurface layers21 use comgeomfi_h, only: long, lati, area 22 use comdiurn_h, only:sinlon, coslon, sinlat, coslat20 & tsoil, nsoilmx ! number of subsurface layers 21 use comgeomfi_h, only: long, lati, area, 22 & sinlon, coslon, sinlat, coslat 23 23 use surfdat_h, only: phisfi, albedodat, zmea, zstd, zsig, zgam, 24 24 & zthe, z0, albedo_h2o_ice, 25 & frost_albedo_threshold 25 & frost_albedo_threshold, 26 & tsurf, co2ice, emis, 27 & capcal, fluxgrd, qsurf 26 28 use comsaison_h, only: dist_sol, declin, mu0, fract 27 29 use slope_mod, only: theta_sl, psi_sl 28 30 use conc_mod, only: rnew, cpnew, mmean 29 31 use control_mod, only: iphysiq, day_step, ecritstart 32 use dimradmars_mod, only: tauscaling, aerosol, 33 & dtrad, fluxrad_sky, fluxrad, albedo 34 use turb_mod, only: q2, wstar, hfmax_th 30 35 #ifdef MESOSCALE 31 36 use comsoil_h, only: mlayer,layer … … 200 205 c Local saved variables: 201 206 c ---------------------- 202 c aerosol (dust or ice) extinction optical depth at reference wavelength203 c "longrefvis" set in dimradmars_mod , for one of the "naerkind" kind of204 c aerosol optical properties :205 REAL,SAVE,ALLOCATABLE :: aerosol(:,:,:)206 207 207 INTEGER,SAVE :: day_ini ! Initial date of the run (sol since Ls=0) 208 208 INTEGER,SAVE :: icount ! counter of calls to physiq during the run. 209 REAL,SAVE,ALLOCATABLE :: tsurf(:) ! Surface temperature (K) 210 REAL,SAVE,ALLOCATABLE :: tsoil(:,:) ! sub-surface temperatures (K) 211 REAL,SAVE,ALLOCATABLE :: co2ice(:) ! co2 ice surface layer (kg.m-2) 212 REAL,SAVE,ALLOCATABLE :: albedo(:,:) ! Surface albedo in each solar band 213 REAL,SAVE,ALLOCATABLE :: emis(:) ! Thermal IR surface emissivity 214 REAL,SAVE,ALLOCATABLE :: dtrad(:,:) ! Net atm. radiative heating rate (K.s-1) 215 REAL,SAVE,ALLOCATABLE :: fluxrad_sky(:) ! rad. flux from sky absorbed by surface (W.m-2) 216 REAL,SAVE,ALLOCATABLE :: fluxrad(:) ! Net radiative surface flux (W.m-2) 217 REAL,SAVE,ALLOCATABLE :: capcal(:) ! surface heat capacity (J m-2 K-1) 218 REAL,SAVE,ALLOCATABLE :: fluxgrd(:) ! surface conduction flux (W.m-2) 219 REAL,ALLOCATABLE,SAVE :: qsurf(:,:) ! tracer on surface (e.g. kg.m-2) 220 REAL,SAVE,ALLOCATABLE :: q2(:,:) ! Turbulent Kinetic Energy 221 209 222 210 c Variables used by the water ice microphysical scheme: 223 211 REAL rice(ngrid,nlayer) ! Water ice geometric mean radius (m) … … 318 306 ! character*5 str5 319 307 real zdtdif(ngrid,nlayer), zdtadj(ngrid,nlayer) 320 REAL,SAVE,ALLOCATABLE :: tauscaling(:) ! Convertion factor for qdust and Ndust321 308 real rdust(ngrid,nlayer) ! dust geometric mean radius (m) 322 309 integer igmin, lmin … … 372 359 REAL zz1(ngrid) 373 360 REAL lmax_th_out(ngrid),zmax_th(ngrid) 374 REAL,SAVE,ALLOCATABLE :: wstar(:)375 REAL,SAVE,ALLOCATABLE :: hfmax_th(:)376 361 REAL pdu_th(ngrid,nlayer),pdv_th(ngrid,nlayer) 377 362 REAL pdt_th(ngrid,nlayer),pdq_th(ngrid,nlayer,nq) … … 399 384 IF (firstcall) THEN 400 385 401 ! allocate local (saved) arrays:402 allocate(qsurf(ngrid,nq))403 allocate(tsoil(ngrid,nsoilmx))404 allocate(tsurf(ngrid))405 allocate(aerosol(ngrid,nlayer,naerkind))406 allocate(co2ice(ngrid))407 allocate(albedo(ngrid,2))408 allocate(emis(ngrid))409 allocate(dtrad(ngrid,nlayer))410 allocate(fluxrad_sky(ngrid))411 allocate(fluxrad(ngrid))412 allocate(capcal(ngrid))413 allocate(fluxgrd(ngrid))414 allocate(q2(ngrid,nlayer+1))415 allocate(tauscaling(ngrid))416 allocate(wstar(ngrid))417 allocate(hfmax_th(ngrid))418 419 386 c variables set to 0 420 387 c ~~~~~~~~~~~~~~~~~~ … … 455 422 tracerdyn=tracer 456 423 IF (tracer) THEN 457 CALL initracer(ngrid,nq,qsurf ,co2ice)424 CALL initracer(ngrid,nq,qsurf) 458 425 ENDIF ! end tracer 459 426 -
trunk/LMDZ.MARS/libf/phymars/soil.F
r1047 r1224 3 3 & timestep,tsurf,tsoil, 4 4 & capcal,fluxgrd) 5 use comsoil_h, only: layer, mlayer, volcapa 5 6 use comsoil_h, only: layer, mlayer, volcapa, 7 & mthermdiff, thermdiff, coefq, 8 & coefd, alph, beta, mu 6 9 use surfdat_h, only: watercaptag, inert_h2o_ice 10 7 11 implicit none 8 12 … … 39 43 real fluxgrd(ngrid) ! surface diffusive heat flux 40 44 41 ! local saved variables:42 real,save,allocatable :: mthermdiff(:,:) ! mid-layer thermal diffusivity43 real,save,allocatable :: thermdiff(:,:) ! inter-layer thermal diffusivity44 real,save,allocatable :: coefq(:) ! q_{k+1/2} coefficients45 real,save,allocatable :: coefd(:,:) ! d_k coefficients46 real,save,allocatable :: alph(:,:) ! alpha_k coefficients47 real,save,allocatable :: beta(:,:) ! beta_k coefficients48 real,save :: mu49 50 45 ! local variables: 51 46 integer ig,ik 52 47 53 48 ! 0. Initialisations and preprocessing step 54 if (firstcall) then55 ! allocate local saved arrays:56 allocate(mthermdiff(ngrid,0:nsoil-1))57 allocate(thermdiff(ngrid,nsoil-1))58 allocate(coefq(0:nsoil-1))59 allocate(coefd(ngrid,nsoil-1))60 allocate(alph(ngrid,nsoil-1))61 allocate(beta(ngrid,nsoil-1))62 endif63 64 49 if (firstcall.or.tifeedback) then 65 50 ! note: firstcall is set to .true. or .false. by the caller -
trunk/LMDZ.MARS/libf/phymars/soil_tifeedback.F
r1047 r1224 14 14 c - One layer of surface water ice (the thickness is given 15 15 c by the variable icecover (in kg of ice per m2) and the thermal 16 c inertia is prescribed by inert_h2o_ice (see surfdat_h and inifis));16 c inertia is prescribed by inert_h2o_ice (see surfdat_h)); 17 17 c - A transitional layer of mixed thermal inertia; 18 18 c - A last layer of regolith below the ice cover whose thermal inertia -
trunk/LMDZ.MARS/libf/phymars/start2archive.F
r1208 r1224 134 134 ! allocate arrays: 135 135 allocate(q(ip1jmp1,llm,nqtot)) 136 allocate(qsurf(ngridmx,nqtot))137 136 allocate(qsurfS(ip1jmp1,nqtot)) 138 call ini_surfdat_h(ngridmx )137 call ini_surfdat_h(ngridmx,nqtot) 139 138 call ini_comsoil_h(ngridmx) 140 139 -
trunk/LMDZ.MARS/libf/phymars/surfdat_h.F90
r1047 r1224 1 1 module surfdat_h 2 2 3 ! arrays are allocated in inifis3 ! arrays are allocated in conf_phys 4 4 real,save,allocatable :: albedodat(:) ! albedo of bare ground 5 5 real,save,allocatable :: phisfi(:) ! geopotential at ground level … … 9 9 logical,save :: TESicealbedo ! use TES ice cap albedoes (if set to .true.) 10 10 logical,save,allocatable :: watercaptag(:) ! flag for water ice surface 11 real, save, allocatable :: dryness(:) 11 12 12 13 logical,save :: temptag !temp tag for water caps … … 22 23 real,save :: z0_default ! default (constant over planet) surface roughness (m) 23 24 25 !! variables 26 REAL,SAVE,ALLOCATABLE :: tsurf(:) ! Surface temperature (K) 27 REAL,SAVE,ALLOCATABLE :: co2ice(:) ! co2 ice surface layer (kg.m-2) 28 REAL,SAVE,ALLOCATABLE :: emis(:) ! Thermal IR surface emissivity 29 REAL,SAVE,ALLOCATABLE :: capcal(:) ! surface heat capacity (J m-2 K-1) 30 REAL,SAVE,ALLOCATABLE :: fluxgrd(:) ! surface conduction flux (W.m-2) 31 REAL,ALLOCATABLE,SAVE :: qsurf(:,:) ! tracer on surface (e.g. kg.m-2) 32 24 33 contains 25 34 26 subroutine ini_surfdat_h(ngrid )35 subroutine ini_surfdat_h(ngrid,nq) 27 36 28 37 implicit none 29 38 integer,intent(in) :: ngrid ! number of atmospheric columns 30 39 integer,intent(in) :: nq ! number of tracers 40 31 41 allocate(albedodat(ngrid)) 32 42 allocate(phisfi(ngrid)) 33 43 allocate(watercaptag(ngrid)) 44 allocate(dryness(ngrid)) 34 45 allocate(zmea(ngrid)) 35 46 allocate(zstd(ngrid)) … … 38 49 allocate(zthe(ngrid)) 39 50 allocate(z0(ngrid)) 40 51 allocate(qsurf(ngrid,nq)) 52 allocate(tsurf(ngrid)) 53 allocate(co2ice(ngrid)) 54 allocate(emis(ngrid)) 55 allocate(capcal(ngrid)) 56 allocate(fluxgrd(ngrid)) 57 41 58 end subroutine ini_surfdat_h 42 59 -
trunk/LMDZ.MARS/libf/phymars/surfini.F
r1212 r1224 3 3 USE ioipsl_getincom 4 4 use netcdf 5 use tracer_mod, only: nqmx, noms , dryness5 use tracer_mod, only: nqmx, noms 6 6 use comgeomfi_h, only: long, lati 7 7 use surfdat_h, only: watercaptag, frost_albedo_threshold, 8 8 & albedo_h2o_ice, inert_h2o_ice, albedodat, 9 & albedice 9 & albedice, dryness 10 10 #ifndef MESOSCALE 11 11 use mod_grid_phy_lmdz, only : klon_glo ! # of physics point on full grid -
trunk/LMDZ.MARS/libf/phymars/testphys1d.F
r1130 r1224 5 5 use infotrac, only: nqtot, tname 6 6 use comsoil_h, only: volcapa, layer, mlayer, inertiedat, nsoilmx 7 use comgeomfi_h, only: lati, long, area 8 use comdiurn_h, only: sinlat 7 use comgeomfi_h, only: lati, long, area, sinlat 9 8 use surfdat_h, only: albedodat, z0_default, emissiv, emisice, 10 9 & albedice, iceradius, dtemisice, z0, … … 473 472 longitude=longitude*pi/180.E+0 474 473 475 ! "inifis" doessome initializations (some of which have already been474 ! some initializations (some of which have already been 476 475 ! done above!) and loads parameters set in callphys.def 477 476 ! and allocates some arrays 478 477 !Mars possible matter with dtphys in input and include!!! 479 CALL inifis(1,llm,nq,day0,daysec,dtphys,480 & latitude,longitude,1.0,rad,g,r,cpp)478 call phys_state_var_init(1,llm,nq,latitude,longitude,1.0) 479 call conf_phys(nq,day0,daysec,dtphys,rad,g,r,cpp) 481 480 482 481 -
trunk/LMDZ.MARS/libf/phymars/tracer_mod.F90
r1036 r1224 4 4 5 5 ! number of tracers: 6 integer,save :: nqmx ! initialized in inifis6 integer,save :: nqmx ! initialized in conf_phys 7 7 8 8 character*20,allocatable,save :: noms(:) ! name of the tracer … … 23 23 real,save :: ccn_factor ! ratio of nuclei for water ice particles 24 24 25 real,allocatable,save :: dryness(:)!"Dryness coefficient" for grnd water ice sublimation26 25 INTEGER,ALLOCATABLE,SAVE :: nqdust(:) ! to store the indexes of dust tracers (cf aeropacity) 26 27 27 ! tracer indexes: these are initialized in initracer and should be 0 if the 28 28 ! corresponding tracer does not exist -
trunk/LMDZ.MARS/libf/phymars/updatereffrad.F
r1208 r1224 8 8 & igcm_ccn_number, nuice_ref, varian, 9 9 & ref_r0, igcm_dust_submicron 10 USE dimradmars_mod, only: nueffdust 10 11 IMPLICIT NONE 11 12 c======================================================================= … … 84 85 REAL tauscaling(ngrid) ! Convertion factor for qccn and Nccn 85 86 86 LOGICAL,SAVE :: firstcall=.true. , firstcall_alloc=.true.87 LOGICAL,SAVE :: firstcall=.true. 87 88 88 89 REAL CBRT 89 90 EXTERNAL CBRT 90 91 REAL,SAVE,ALLOCATABLE :: nueffdust(:,:) ! Dust effective variance92 93 c Local saved variables:94 c ---------------------95 96 if (firstcall_alloc) then97 !allocate local saved arrays:98 allocate(nueffdust(ngrid,nlayer))99 firstcall_alloc=.false.100 endif101 91 102 92 c================================================================== -
trunk/LMDZ.MARS/libf/phymars/vdifc.F
r1130 r1224 13 13 use tracer_mod, only: noms, igcm_dust_mass, igcm_dust_number, 14 14 & igcm_dust_submicron, igcm_h2o_vap, 15 & igcm_h2o_ice, dryness,alpha_lift16 use surfdat_h, only: watercaptag, frost_albedo_threshold 15 & igcm_h2o_ice, alpha_lift 16 use surfdat_h, only: watercaptag, frost_albedo_threshold, dryness 17 17 IMPLICIT NONE 18 18 -
trunk/LMDZ.MARS/libf/phymars/yamada4.F
r1046 r1224 12 12 s ,iflag_pbl) 13 13 use tracer_mod, only: noms 14 use turb_mod, only: l0 14 15 IMPLICIT NONE 15 16 !....................................................................... … … 91 92 REAL m2cstat,mcstat,kmcstat 92 93 REAL l(ngrid,nlay+1) 93 REAL,allocatable,SAVE :: l0(:)94 94 REAL sq(ngrid),sqz(ngrid),zz(ngrid,nlay+1) 95 95 INTEGER iter … … 151 151 enddo 152 152 endif 153 allocate(l0(ngrid))154 153 ndt=ceiling(3840./(3699.*24./dt)) 155 154 firstcall=.false. -
trunk/LMDZ.MARS/libf/phymars/yomlw_h.F90
r1047 r1224 24 24 contains 25 25 26 ! Allocate array (subroutine ini_yomlw_h is called by inifis)26 ! Allocate array (subroutine ini_yomlw_h is called by phys_state_var_init) 27 27 subroutine ini_yomlw_h(ngrid) 28 28
Note: See TracChangeset
for help on using the changeset viewer.