Changeset 1621 for trunk/LMDZ.MARS/libf/phymars
- Timestamp:
- Oct 25, 2016, 9:23:21 AM (8 years ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F
r1576 r1621 21 21 & ecritphy, iphysiq 22 22 use dimradmars_mod, only: tauscaling,tauvis 23 USE comvert_mod, ONLY: ap,bp,aps,bps,pa,preff,sig 23 USE comvert_mod, ONLY: ap,bp,aps,bps,pa,preff,sig, 24 & presnivs,pseudoalt,scaleheight 25 USE vertical_layers_mod, ONLY: init_vertical_layers 24 26 USE logic_mod, ONLY: hybrid 25 27 use physics_distribution_mod, only: init_physics_distribution … … 49 51 c======================================================================= 50 52 51 #include "dimensions.h"53 include "dimensions.h" 52 54 integer, parameter :: ngrid = 1 !(2+(jjm-1)*iim - 1/jjm) 53 55 integer, parameter :: nlayer = llm … … 58 60 !#include "comsoil.h" 59 61 !#include "comdiurn.h" 60 #include "callkeys.h"62 include "callkeys.h" 61 63 !#include "comsaison.h" 62 64 !#include "control.h" 63 #include "netcdf.inc"64 #include "comg1d.h"65 include "netcdf.inc" 66 include "comg1d.h" 65 67 !#include "advtrac.h" 66 68 … … 494 496 & (/0.,0.,0.,0./),(/0.,0.,0.,0./), 495 497 & cell_area) 498 ! Ehouarn: init_vertial_layers called later (because disvert not called yet) 499 ! call init_vertical_layers(nlayer,preff,scaleheight, 500 ! & ap,bp,aps,bps,presnivs,pseudoalt) 496 501 call init_dimphy(1,nlayer) ! Initialize dimphy module 497 call phys_state_var_init(1,llm,nq, 502 call phys_state_var_init(1,llm,nq,tname, 498 503 . day0,time,daysec,dtphys,rad,g,r,cpp) 499 504 call ini_fillgeom(1,latitude,longitude,(/1.0/)) … … 611 616 612 617 CALL disvert 618 ! now that disvert has been called, initialize module vertical_layers_mod 619 call init_vertical_layers(nlayer,preff,scaleheight, 620 & ap,bp,aps,bps,presnivs,pseudoalt) 613 621 614 622 DO ilevel=1,nlevel -
trunk/LMDZ.MARS/libf/phymars/eofdump_mod.F90
r1543 r1621 81 81 82 82 use geometry_mod, only: longitude, latitude 83 use comcstfi_h, only: pi83 use nrtype, only: pi 84 84 use time_phylmdz_mod, only: daysec, dtphys 85 USE comvert_mod, ONLY: aps,bps85 USE vertical_layers_mod, ONLY: aps,bps 86 86 use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat 87 87 implicit none -
trunk/LMDZ.MARS/libf/phymars/inistats.F
r1532 r1621 3 3 use statto_mod, only: istats,istime 4 4 use mod_phys_lmdz_para, only : is_master 5 USE comvert_mod, ONLY: ap,bp,aps,bps,preff,pseudoalt,presnivs 6 USE comcstfi_h, ONLY: pi 5 USE vertical_layers_mod, ONLY: ap,bp,aps,bps,preff, 6 & pseudoalt,presnivs 7 USE nrtype, ONLY: pi 7 8 USE time_phylmdz_mod, ONLY: daysec,dtphys 8 9 USE regular_lonlat_mod, ONLY: lon_reg, lat_reg -
trunk/LMDZ.MARS/libf/phymars/initracer.F
r1617 r1621 1 1 SUBROUTINE initracer(ngrid,nq,qsurf) 2 2 3 #ifndef MESOSCALE4 use infotrac, only: tname5 #endif6 3 use tracer_mod 7 4 USE comcstfi_h … … 54 51 c----------------------------------------------------------------------- 55 52 56 ! Initialization: allocate arrays in tracer_mod57 allocate(mmol(nq))58 allocate(radius(nq))59 allocate(rho_q(nq))60 allocate(alpha_lift(nq))61 allocate(alpha_devil(nq))62 allocate(igcm_dustbin(nq))63 allocate(nqdust(nq))64 65 #ifndef MESOSCALE66 allocate(noms(nq))67 ! Initialization: get tracer names from the dynamics and check if we are68 ! using 'old' tracer convention ('q01',q02',...)69 ! or new convention (full tracer names)70 ! check if tracers have 'old' names71 72 count=073 do iq=1,nq74 txt=" "75 write(txt,'(a1,i2.2)') 'q',iq76 if (txt.eq.tname(iq)) then77 count=count+178 endif79 enddo ! of do iq=1,nq80 81 if (count.eq.nq) then82 write(*,*) "initracer: tracers seem to follow old naming ",83 & "convention (q01,q02,...)"84 write(*,*) "you should run newstart to rename them"85 stop86 endif87 88 ! copy tracer names from dynamics89 do iq=1,nq90 noms(iq)=tname(iq)91 write(*,*) "initracer names : ", noms(iq)92 enddo93 #endif94 53 95 54 c------------------------------------------------------------ -
trunk/LMDZ.MARS/libf/phymars/iniwrite.F
r1532 r1621 3 3 use comsoil_h, only: mlayer, nsoilmx 4 4 USE comcstfi_h, only: g, mugaz, omeg, rad, rcp, pi 5 USE comvert_mod, ONLY: ap,bp,aps,bps,pseudoalt6 USE logic_mod, ONLY: fxyhypb,ysinus7 USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy5 USE vertical_layers_mod, ONLY: ap,bp,aps,bps,pseudoalt 6 ! USE logic_mod, ONLY: fxyhypb,ysinus 7 ! USE serre_mod, ONLY: clon,clat,grossismx,grossismy,dzoomx,dzoomy 8 8 USE time_phylmdz_mod, ONLY: hour_ini, daysec, dtphys 9 USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang09 ! USE ener_mod, ONLY: etot0,ptot0,ztot0,stot0,ang0 10 10 USE regular_lonlat_mod, ONLY: lon_reg, lat_reg 11 11 USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev … … 75 75 tab_cntrl(10) = daysec 76 76 tab_cntrl(11) = dtphys 77 tab_cntrl(12) = etot078 tab_cntrl(13) = ptot079 tab_cntrl(14) = ztot080 tab_cntrl(15) = stot081 tab_cntrl(16) = ang077 ! tab_cntrl(12) = etot0 78 ! tab_cntrl(13) = ptot0 79 ! tab_cntrl(14) = ztot0 80 ! tab_cntrl(15) = stot0 81 ! tab_cntrl(16) = ang0 82 82 83 83 tab_cntrl(27) = hour_ini … … 85 85 c .......... P.Le Van ( ajout le 8/04/96 ) ......... 86 86 c ..... parametres pour le zoom ...... 87 tab_cntrl(17) = clon88 tab_cntrl(18) = clat89 tab_cntrl(19) = grossismx90 tab_cntrl(20) = grossismy87 ! tab_cntrl(17) = clon 88 ! tab_cntrl(18) = clat 89 ! tab_cntrl(19) = grossismx 90 ! tab_cntrl(20) = grossismy 91 91 c 92 92 c ..... ajout le 6/05/97 et le 15/10/97 ....... 93 93 c 94 IF ( fxyhypb ) THEN95 tab_cntrl(21) = 1.96 tab_cntrl(22) = dzoomx97 tab_cntrl(23) = dzoomy98 ELSE99 tab_cntrl(21) = 0.100 tab_cntrl(22) = dzoomx101 tab_cntrl(23) = dzoomy102 tab_cntrl(24) = 0.103 IF( ysinus ) tab_cntrl(24) = 1.104 ENDIF94 ! IF ( fxyhypb ) THEN 95 ! tab_cntrl(21) = 1. 96 ! tab_cntrl(22) = dzoomx 97 ! tab_cntrl(23) = dzoomy 98 ! ELSE 99 ! tab_cntrl(21) = 0. 100 ! tab_cntrl(22) = dzoomx 101 ! tab_cntrl(23) = dzoomy 102 ! tab_cntrl(24) = 0. 103 ! IF( ysinus ) tab_cntrl(24) = 1. 104 ! ENDIF 105 105 106 106 c ......................................................... -
trunk/LMDZ.MARS/libf/phymars/iostart.F90
r1504 r1621 464 464 USE mod_grid_phy_lmdz, only: klon_glo 465 465 USE dimphy, only: klev, klevp1 466 USE infotrac, only: nqtot466 USE tracer_mod, only: nqmx 467 467 USE comsoil_h, only: nsoilmx 468 468 IMPLICIT NONE … … 528 528 ENDIF 529 529 530 if (nq tot.ne.0) then531 ierr=NF90_DEF_DIM(nid_restart,"number_of_advected_fields",nq tot,idim5)530 if (nqmx.ne.0) then 531 ierr=NF90_DEF_DIM(nid_restart,"number_of_advected_fields",nqmx,idim5) 532 532 else 533 ! pretend nq tot=1 because 0 size implies unlimited dimension for NetCDF533 ! pretend nqmx=1 because 0 size implies unlimited dimension for NetCDF 534 534 ierr=NF90_DEF_DIM(nid_restart,"number_of_advected_fields",1,idim5) 535 535 endif -
trunk/LMDZ.MARS/libf/phymars/newcondens.F
r1543 r1621 12 12 USE comcstfi_h 13 13 #ifndef MESOSCALE 14 USE comvert_mod, ONLY: bp14 USE vertical_layers_mod, ONLY: bp 15 15 #endif 16 16 IMPLICIT NONE -
trunk/LMDZ.MARS/libf/phymars/phyetat0.F90
r1525 r1621 3 3 tauscaling) 4 4 ! use netcdf 5 use infotrac, only: nqtot, tname5 use tracer_mod, only: noms ! tracer names 6 6 use surfdat_h, only: phisfi, albedodat, z0, z0_default,& 7 7 zmea, zstd, zsig, zgam, zthe … … 289 289 if (nq.ge.1) then 290 290 do iq=1,nq 291 txt= tname(iq)291 txt=noms(iq) 292 292 if (txt.eq."h2o_vap") then 293 293 ! There is no surface tracer for h2o_vap; -
trunk/LMDZ.MARS/libf/phymars/phyredem.F90
r1543 r1621 12 12 alb,ith,pzmea,pzstd,pzsig,pzgam,pzthe) 13 13 ! create physics restart file and write time-independent variables 14 use infotrac, only: nqtot, tname15 14 use comsoil_h, only: inertiedat, volcapa, mlayer 16 15 use geometry_mod, only: cell_area … … 150 149 use iostart, only : open_restartphy, close_restartphy, & 151 150 put_var, put_field 152 use infotrac, only: nqtot, tname151 use tracer_mod, only: noms ! tracer names 153 152 implicit none 154 153 character(len=*),intent(in) :: filename … … 204 203 ! preliminary stuff: look for water vapour & water ice tracers (if any) 205 204 do iq=1,nq 206 if ( tname(iq).eq."h2o_vap") then205 if (noms(iq).eq."h2o_vap") then 207 206 i_h2o_vap=iq 208 207 endif 209 if ( tname(iq).eq."h2o_ice") then208 if (noms(iq).eq."h2o_ice") then 210 209 i_h2o_ice=iq 211 210 endif … … 214 213 if (nq.gt.0) then 215 214 do iq=1,nq 216 txt= tname(iq)215 txt=noms(iq) 217 216 ! Exception: there is no water vapour surface tracer 218 217 if (txt.eq."h2o_vap") then -
trunk/LMDZ.MARS/libf/phymars/phys_state_var_init_mod.F90
r1524 r1621 3 3 CONTAINS 4 4 5 SUBROUTINE phys_state_var_init(ngrid,nlayer,nq, &5 SUBROUTINE phys_state_var_init(ngrid,nlayer,nq,tname, & 6 6 day_ini,hour_ini,pdaysec,ptimestep, & 7 7 prad,pg,pr,pcpp) … … 44 44 use turb_mod, only: ini_turb_mod 45 45 use comcstfi_h, only: pi,rad,cpp,g,r,rcp 46 use tracer_mod, only: nqmx46 use tracer_mod, only: ini_tracer_mod 47 47 use time_phylmdz_mod, only: init_time 48 48 … … 50 50 51 51 INTEGER,INTENT(IN) :: ngrid,nlayer,nq 52 CHARACTER(len=*),INTENT(IN) :: tname(nq) 52 53 INTEGER,INTENT(IN) :: day_ini 53 54 REAL,INTENT(IN) :: hour_ini 54 55 REAL,INTENT(IN) :: pdaysec,ptimestep,prad,pg,pr,pcpp 55 56 56 ! set dimension in tracer_mod57 nqmx=nq57 ! set dimension and allocate arrays in tracer_mod 58 call ini_tracer_mod(nq,tname) 58 59 59 60 ! set parameters in comcstfi_h -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r1618 r1621 53 53 use phyredem, only: physdem0, physdem1 54 54 use eofdump_mod, only: eofdump 55 USE comvert_mod, ONLY: ap,bp,aps,bps55 USE vertical_layers_mod, ONLY: ap,bp,aps,bps 56 56 #endif 57 57 -
trunk/LMDZ.MARS/libf/phymars/tracer_mod.F90
r1617 r1621 88 88 !----------------------------------------------------------------------- 89 89 90 contains 91 92 subroutine ini_tracer_mod(nq,tname) 93 implicit none 94 95 integer,intent(in) :: nq ! number of tracers 96 character(len=*),intent(in) :: tname(nq) ! tracer names 97 98 integer :: iq, count 99 character(len=20) :: txt ! to store some text 100 101 ! set dimension and tracer names 102 nqmx=nq 103 #ifndef MESOSCALE 104 allocate(noms(nq)) 105 do iq=1,nq 106 noms(iq)=tname(iq) 107 write(*,*) "tracer_mod names : ", trim(noms(iq)) 108 enddo 109 110 ! check if tracers have 'old' names 111 count=0 112 do iq=1,nq 113 txt=" " 114 write(txt,'(a1,i2.2)') 'q',iq 115 if (txt.eq.tname(iq)) then 116 count=count+1 117 endif 118 enddo ! of do iq=1,nq 119 120 if (count.eq.nq) then 121 write(*,*) "ini_tracer_mod: tracers seem to follow old naming ", & 122 "convention (q01,q02,...)" 123 write(*,*) "you should run newstart to rename them" 124 stop 125 endif 126 #endif 127 128 ! allocate module arrays: 129 allocate(mmol(nq)) 130 allocate(radius(nq)) 131 allocate(rho_q(nq)) 132 allocate(alpha_lift(nq)) 133 allocate(alpha_devil(nq)) 134 allocate(igcm_dustbin(nq)) 135 allocate(nqdust(nq)) 136 137 end subroutine ini_tracer_mod 138 90 139 end module tracer_mod
Note: See TracChangeset
for help on using the changeset viewer.