Changeset 1233
- Timestamp:
- May 1, 2014, 12:06:13 AM (11 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 4 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r1232 r1233 2051 2051 (saved arrays) which have been moved to modules. 2052 2052 2053 == 01/05/2014 == AS 2054 - Filling geom arrays is now out of phys_var_state_init. Done 2055 through a merged function ini_fillgeom within the comgeomfi_h module. 2056 - Cosmetic changes 2057 - New interface with the mesoscale model: lesser amount of dirty MESOSCALE includes -
trunk/LMDZ.MARS/libf/phymars/comgeomfi_h.F90
r1224 r1233 24 24 allocate(long(ngrid)) 25 25 allocate(area(ngrid)) 26 27 end subroutine ini_comgeomfi_h28 29 subroutine ini_sincosgeom(ngrid)30 31 implicit none32 integer,intent(in) :: ngrid ! number of atmospheric columns33 integer :: ig34 35 if (.not.allocated(lati)) then36 PRINT*,"lati not allocated. did you run ini_comgeomfi_h?"37 STOP38 endif39 40 26 allocate(sinlat(ngrid)) 41 27 allocate(coslat(ngrid)) 42 28 allocate(sinlon(ngrid)) 43 29 allocate(coslon(ngrid)) 30 31 end subroutine ini_comgeomfi_h 32 33 subroutine ini_fillgeom(ngrid,plat,plon,parea) 34 35 implicit none 36 INTEGER,INTENT(IN) :: ngrid ! number of atmospheric columns 37 REAL,INTENT(IN) :: plat(ngrid),plon(ngrid),parea(ngrid) 38 EXTERNAL SSUM 39 REAL SSUM 40 integer :: ig 41 42 ! fill "comgeomfi_h" data 43 call SCOPY(ngrid,plon,1,long,1) 44 call SCOPY(ngrid,plat,1,lati,1) 45 call SCOPY(ngrid,parea,1,area,1) 46 totarea=SSUM(ngrid,area,1) 44 47 DO ig=1,ngrid 45 48 sinlat(ig)=sin(lati(ig)) … … 48 51 coslon(ig)=cos(long(ig)) 49 52 ENDDO 50 end subroutine ini_sincosgeom 53 54 end subroutine ini_fillgeom 51 55 52 56 end module comgeomfi_h -
trunk/LMDZ.MARS/libf/phymars/conf_phys.F
r1226 r1233 27 27 ! 28 28 ! nq Number of tracers 29 ! pdayref Day of reference for the simulation30 ! pday Number of days counted from the North. Spring31 ! equinoxe.32 29 ! 33 30 !======================================================================= -
trunk/LMDZ.MARS/libf/phymars/iniphysiq.F90
r1226 r1233 16 16 rlatd ! latitudes 17 17 use infotrac, only : nqtot ! number of advected tracers 18 use comgeomfi_h, only: ini_fillgeom 18 19 19 20 implicit none … … 70 71 ! and do some initializations 71 72 call phys_state_var_init(klon_omp,nlayer,nqtot, & 72 rlatd,rlond,airephy, &73 73 punjours,ptimestep,prad,pg,pr,pcpp) 74 call ini_fillgeom(ngrid,rlatd,rlond,airephy) 74 75 call conf_phys(nqtot) 75 76 -
trunk/LMDZ.MARS/libf/phymars/meso_inc/meso_inc_var.F
r1112 r1233 1 INTEGER wday_ini2 REAL wtsurf(ngrid) ! input only ay firstcall - output3 REAL wtsoil(ngrid,nsoilmx)4 REAL wisoil(ngrid,nsoilmx) !! new soil scheme5 REAL wdsoil(ngrid,nsoilmx) !! new soil scheme6 REAL wco2ice(ngrid)7 REAL wemis(ngrid)8 REAL wqsurf(ngrid,nq)9 REAL wq2(ngrid,nlayermx+1)10 REAL wwstar(ngrid)11 REAL wfluxrad(ngrid)12 1 REAL output_tab2d(ngrid,n2d) 13 2 REAL output_tab3d(ngrid,nlayer,n3d) … … 16 5 LOGICAL flag_LES !! pour LES avec isfflx!=0 17 6 REAL qsurfice(ngrid) !! pour diagnostics 18 real alpha,lay1 ! coefficients for building layers19 integer iloop20 7 INTEGER tracerset !!! this corresponds to config%mars 21 CHARACTER (len=20) :: wtnom(nq) ! tracer name22 8 23 9 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! JF -
trunk/LMDZ.MARS/libf/phymars/newstart.F
r1232 r1233 33 33 use dimradmars_mod, only: tauscaling 34 34 use turb_mod, only: q2 35 use comgeomfi_h, only: ini_fillgeom 36 35 37 implicit none 36 38 … … 387 389 ! 'datafile' path may be changed by user) 388 390 call phys_state_var_init(ngridmx,llm,nqtot, 389 . latfi,lonfi,airefi,390 391 . daysec,dtphys,rad,g,r,cpp) 392 call ini_fillgeom(ngrid,latfi,lonfi,airefi) 391 393 call conf_phys(nqtot) 392 394 -
trunk/LMDZ.MARS/libf/phymars/orbite.F
r1226 r1233 37 37 c ---------- 38 38 39 REAL pd ay,pdist_sol,pdecli,pls,i39 REAL pdist_sol,pdecli,pls,i 40 40 41 41 c----------------------------------------------------------------------- -
trunk/LMDZ.MARS/libf/phymars/phys_state_var_init.F
r1226 r1233 1 SUBROUTINE phys_state_var_init(ngrid 2 . ,nlayer,nq,plat,plon,parea 1 SUBROUTINE phys_state_var_init(ngrid,nlayer,nq 3 2 . ,pdaysec,ptimestep,prad,pg,pr,pcpp) 4 3 … … 34 33 use surfdat_h, only: ini_surfdat_h 35 34 use comgeomfi_h, only: ini_comgeomfi_h 36 . ,long,lati,area,totarea37 . ,ini_sincosgeom38 35 use comsoil_h, only: ini_comsoil_h 39 36 use dimradmars_mod, only: ini_dimradmars_mod … … 48 45 49 46 INTEGER,INTENT(IN) :: ngrid,nlayer,nq 50 REAL,INTENT(IN) :: plat(ngrid),plon(ngrid),parea(ngrid)51 47 REAL,INTENT(IN) :: pdaysec,ptimestep,prad,pg,pr,pcpp 52 48 EXTERNAL SSUM … … 77 73 ! allocate "comgeomfi_h" arrays 78 74 call ini_comgeomfi_h(ngrid) 79 ! fill "comgeomfi_h" data80 call SCOPY(ngrid,plon,1,long,1)81 call SCOPY(ngrid,plat,1,lati,1)82 call SCOPY(ngrid,parea,1,area,1)83 totarea=SSUM(ngrid,area,1)84 ! create sin cos lat lon arrays85 ! -- previously in comdiurn86 CALL ini_sincosgeom(ngrid)87 75 88 76 ! allocate "comsoil_h" arrays -
trunk/LMDZ.MARS/libf/phymars/physiq.F
r1229 r1233 8 8 $ ,pdu,pdv,pdt,pdq,pdpsrf,tracerdyn 9 9 #ifdef MESOSCALE 10 #include "meso_inc/meso_inc_invar.F" 10 $ ,output_tab2d, output_tab3d, flag_LES 11 11 #endif 12 12 $ ) … … 206 206 c Local saved variables: 207 207 c ---------------------- 208 INTEGER,SAVE :: day_ini ! Initial date of the run (sol since Ls=0)208 INTEGER,SAVE :: day_ini ! Initial date of the run (sol since Ls=0) 209 209 INTEGER,SAVE :: icount ! counter of calls to physiq during the run. 210 210 … … 393 393 fluxrad(:)=0 394 394 wstar(:)=0. 395 #else396 #include "meso_inc/meso_inc_ini_restart.F"397 395 #endif 398 396 … … 400 398 c ~~~~~~~~~~~~ 401 399 #ifndef MESOSCALE 402 ! Read netcdf initial physical parameters.400 ! GCM. Read netcdf initial physical parameters. 403 401 CALL phyetat0 ("startfi.nc",0,0, 404 402 & nsoilmx,ngrid,nlayer,nq, 405 403 & day_ini,time_phys, 406 404 & tsurf,tsoil,emis,q2,qsurf,co2ice,tauscaling) 407 #else408 #include "meso_inc/meso_inc_ini.F"409 #endif410 405 411 406 if (pday.ne.day_ini) then … … 418 413 419 414 write (*,*) 'In physiq day_ini =', day_ini 415 416 #else 417 ! MESOSCALE. Supposedly everything is already set in modules. 418 ! So we just check. And we calculate day_ini + two param in dyn3d/control_mod. 419 print*,"check: rad,cpp,g,r,rcp,daysec" 420 print*,rad,cpp,g,r,rcp,daysec 421 PRINT*,'check: tsurf ',tsurf(1),tsurf(ngrid) 422 PRINT*,'check: tsoil ',tsoil(1,1),tsoil(ngrid,nsoilmx) 423 PRINT*,'check: inert ',inertiedat(1,1),inertiedat(ngrid,nsoilmx) 424 PRINT*,'check: midlayer,layer ', mlayer(:),layer(:) 425 PRINT*,'check: tracernames ', noms 426 PRINT*,'check: emis ',emis(1),emis(ngrid) 427 PRINT*,'check: q2 ',q2(1,1),q2(ngrid,nlayermx+1) 428 PRINT*,'check: qsurf ',qsurf(1,1),qsurf(ngrid,nq) 429 PRINT*,'check: co2 ',co2ice(1),co2ice(ngrid) 430 day_step=daysec/ptimestep 431 PRINT*,'Call to LMD physics:',day_step,' per Martian day' 432 iphysiq=ptimestep 433 day_ini = pday 434 #endif 420 435 421 436 c initialize tracers … … 1373 1388 c 10. Write output files 1374 1389 c ---------------------- 1375 1376 c Save variables for eventual restart in MMM and LES1377 #ifdef MESOSCALE1378 #include "meso_inc/meso_inc_save_restart.F"1379 #endif1380 1390 1381 1391 c ------------------------------- … … 1881 1891 !!! OUTPUT FIELDS 1882 1892 !!! 1883 wtsurf(1:ngrid) = tsurf(1:ngrid) !! surface temperature1884 wco2ice(1:ngrid) = co2ice(1:ngrid) !! co2 ice1893 !wtsurf(1:ngrid) = tsurf(1:ngrid) !! surface temperature 1894 !wco2ice(1:ngrid) = co2ice(1:ngrid) !! co2 ice 1885 1895 TAU_lay(:)=tau(:,1)!!true opacity (not a reference like tauref) 1886 1896 IF (tracer) THEN -
trunk/LMDZ.MARS/libf/phymars/testphys1d.F
r1229 r1233 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, sinlat 7 use comgeomfi_h, only: lati, long, area, sinlat, ini_fillgeom 8 8 9 use surfdat_h, only: albedodat, z0_default, emissiv, emisice, 9 10 & albedice, iceradius, dtemisice, z0, … … 480 481 !Mars possible matter with dtphys in input and include!!! 481 482 call phys_state_var_init(1,llm,nq, 482 . latitude,longitude,1.0,483 483 . daysec,dtphys,rad,g,r,cpp) 484 call ini_fillgeom(1,latitude,longitude,1.0) 484 485 call conf_phys(nq) 485 486
Note: See TracChangeset
for help on using the changeset viewer.