Changeset 1944 for trunk/LMDZ.MARS/libf/phymars
- Timestamp:
- Jun 5, 2018, 8:38:22 AM (6 years ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars
- Files:
-
- 5 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/dyn1d/testphys1d.F
r1920 r1944 21 21 & ecritphy, iphysiq 22 22 use dimradmars_mod, only: tauscaling,tauvis,totcloudfrac 23 use co2cloud_mod, only: mem_Mccn_co2, mem_Mh2o_co2, 24 & mem_Nccn_co2 23 25 USE comvert_mod, ONLY: ap,bp,aps,bps,pa,preff,sig, 24 26 & presnivs,pseudoalt,scaleheight … … 92 94 REAL co2ice(1) ! co2ice layer (kg.m-2) 93 95 REAL emis(1) ! surface layer 96 REAL albedo(1,1) ! surface albedo 97 REAL :: wstar(1)=0. ! Thermals vertical velocity 94 98 REAL q2(nlayer+1) ! Turbulent Kinetic Energy 95 99 REAL zlay(nlayer) ! altitude estimee dans les couches (km) … … 522 526 call getin("albedo",albedodat(1)) 523 527 write(*,*) " albedo = ",albedodat(1) 528 albedo(1,1)=albedodat(1) 524 529 525 530 inertiedat(1,1)=400 ! default value for inertiedat … … 593 598 call getin("co2ice",co2ice) 594 599 write(*,*) " co2ice = ",co2ice 595 600 ! Initialization for CO2 clouds (could be improved to read initial profiles) 601 mem_Mccn_co2(:,:)=0 602 mem_Mh2o_co2(:,:)=0 603 mem_Nccn_co2(:,:)=0 596 604 c 597 605 c emissivity … … 710 718 & albedodat,inertiedat,zmea,zstd,zsig,zgam,zthe) 711 719 call physdem1("startfi.nc",nsoilmx,ngrid,llm,nq, 712 . dtphys,time, 713 . tsurf,tsoil,co2ice,emis,q2,qsurf,tauscaling, 714 . totcloudfrac) 720 & dtphys,time, 721 & tsurf,tsoil,co2ice,albedo,emis,q2,qsurf,tauscaling, 722 & totcloudfrac,wstar, 723 & mem_Mccn_co2,mem_Nccn_co2, 724 & mem_Mh2o_co2) 715 725 716 726 c======================================================================= -
trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90
r1940 r1944 1 module phyetat0_mod 2 3 implicit none 4 5 contains 6 1 7 subroutine phyetat0 (fichnom,tab0,Lmodif,nsoil,ngrid,nlay,nq, & 2 day_ini,time0,tsurf,tsoil, emis,q2,qsurf,co2ice, &3 tauscaling,totcloudfrac, mem_Mccn_co2,mem_Nccn_co2,&8 day_ini,time0,tsurf,tsoil,albedo,emis,q2,qsurf,co2ice, & 9 tauscaling,totcloudfrac,wstar,mem_Mccn_co2,mem_Nccn_co2,& 4 10 mem_Mh2o_co2) 5 11 … … 42 48 real,intent(out) :: tsurf(ngrid) ! surface temperature 43 49 real,intent(out) :: tsoil(ngrid,nsoil) ! soil temperature 50 real,intent(out) :: albedo(ngrid,2) ! surface albedo 44 51 real,intent(out) :: emis(ngrid) ! surface emissivity 45 52 real,intent(out) :: q2(ngrid,nlay+1) ! … … 48 55 real,intent(out) :: tauscaling(ngrid) ! dust conversion factor 49 56 real,intent(out) :: totcloudfrac(ngrid) ! total cloud fraction 57 real,intent(out) :: wstar(ngrid) ! Max vertical velocity in thermals (m/s) 50 58 real,intent(out) :: mem_Mccn_co2(ngrid,nlay) ! Memory of CCN mass of H2O and dust used by CO2 51 59 real,intent(out) :: mem_Nccn_co2(ngrid,nlay) ! Memory of CCN number of H2O and dust used by CO2 … … 285 293 endif 286 294 295 ! Max vertical velocity in thermals 296 call get_field("wstar",wstar,found,indextime) 297 if (.not.found) then 298 write(*,*) "phyetat0: <totcloudfrac> not in file! Set to zero" 299 wstar(:)=0 300 else 301 write(*,*) "phyetat0: Max vertical velocity in thermals <wstar> range:", & 302 minval(wstar),maxval(wstar) 303 endif 304 287 305 ! Surface temperature : 288 306 call get_field("tsurf",tsurf,found,indextime) … … 294 312 minval(tsurf), maxval(tsurf) 295 313 endif 314 315 ! Surface albedo 316 call get_field("albedo",albedo(:,1),found,indextime) 317 if (.not.found) then 318 write(*,*) "phyetat0: Failed loading <albedo>" 319 albedo(:,1)=albedodat(:) 320 else 321 write(*,*) "phyetat0: Surface albedo <albedo> range:", & 322 minval(albedo(:,1)), maxval(albedo(:,1)) 323 endif 324 albedo(:,2)=albedo(:,1) 296 325 297 326 ! Surface emissivity … … 353 382 ! Call to soil_settings, in order to read soil temperatures, 354 383 ! as well as thermal inertia and volumetric heat capacity 355 356 call soil_settings(nid_start,ngrid,nsoil,tsurf,tsoil,indextime) 384 call soil_settings(nid_start,ngrid,nsoil,tsurf,tsoil,indextime) 357 385 358 386 ! 359 387 ! close file: 360 388 ! 361 call close_startphy 362 363 END 389 call close_startphy 390 391 end subroutine phyetat0 392 393 end module phyetat0_mod -
trunk/LMDZ.MARS/libf/phymars/phyredem.F90
r1922 r1944 144 144 145 145 subroutine physdem1(filename,nsoil,ngrid,nlay,nq, & 146 phystep,time,tsurf,tsoil,co2ice, emis,q2,qsurf,&147 tauscaling,totcloudfrac, mem_Mccn_co2,mem_Nccn_co2,&148 mem_M h2o_co2)146 phystep,time,tsurf,tsoil,co2ice,albedo,emis,q2,qsurf,& 147 tauscaling,totcloudfrac,wstar, & 148 mem_Mccn_co2,mem_Nccn_co2,mem_Mh2o_co2) 149 149 ! write time-dependent variable to restart file 150 150 use iostart, only : open_restartphy, close_restartphy, & … … 166 166 real,intent(in) :: tsoil(ngrid,nsoil) 167 167 real,intent(in) :: co2ice(ngrid) 168 real,intent(in) :: albedo(ngrid,2) 168 169 real,intent(in) :: emis(ngrid) 169 170 real,intent(in) :: q2(ngrid,nlay+1) … … 171 172 real,intent(in) :: tauscaling(ngrid) 172 173 real,intent(in) :: totcloudfrac(ngrid) 174 real,intent(in) :: wstar(ngrid) 173 175 real,intent(in) :: mem_Mccn_co2(ngrid,nlay) ! CCN mass of H2O and dust used by CO2 174 176 real,intent(in) :: mem_Nccn_co2(ngrid,nlay) ! CCN number of H2O and dust used by CO2 … … 197 199 ! Soil temperature 198 200 call put_field("tsoil","Soil temperature",tsoil,time) 201 202 ! Albedo of the surface 203 call put_field("albedo","Surface albedo",albedo(:,1),time) 199 204 200 205 ! Emissivity of the surface … … 211 216 ! Or by any user who wants to reconstruct dust, opacity from the start files. 212 217 call put_field("tauscaling","dust conversion factor",tauscaling,time) 218 219 if (calltherm) then 220 call put_field("wstar","Max vertical velocity in thermals",wstar,time) 221 endif 213 222 214 223 ! Tracers on the surface -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r1934 r1944 59 59 use planetwide_mod 60 60 use phyredem, only: physdem0, physdem1 61 use phyetat0_mod, only: phyetat0 61 62 use eofdump_mod, only: eofdump 62 63 USE vertical_layers_mod, ONLY: ap,bp,aps,bps … … 435 436 & nsoilmx,ngrid,nlayer,nq, 436 437 & day_ini,time_phys, 437 & tsurf,tsoil,emis,q2,qsurf,co2ice,tauscaling, 438 & totcloudfrac,mem_Mccn_co2,mem_Nccn_co2, 438 & tsurf,tsoil,albedo,emis, 439 & q2,qsurf,co2ice,tauscaling,totcloudfrac,wstar, 440 & mem_Mccn_co2,mem_Nccn_co2, 439 441 & mem_Mh2o_co2) 440 442 … … 476 478 c Initialize albedo and orbital calculation 477 479 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 478 CALL surfini(ngrid,co2ice,qsurf ,albedo)480 CALL surfini(ngrid,co2ice,qsurf) 479 481 CALL iniorbit(aphelie,periheli,year_day,peri_day,obliquit) 480 482 … … 1844 1846 call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq, 1845 1847 . ptimestep,ztime_fin, 1846 . tsurf,tsoil,co2ice, emis,q2,qsurf,tauscaling,1847 . totcloudfrac,mem_Mccn_co2,mem_Nccn_co2,1848 . mem_M h2o_co2)1848 . tsurf,tsoil,co2ice,albedo,emis, 1849 . q2,qsurf,tauscaling,totcloudfrac,wstar, 1850 . mem_Mccn_co2,mem_Nccn_co2,mem_Mh2o_co2) 1849 1851 1850 1852 ENDIF -
trunk/LMDZ.MARS/libf/phymars/surfini.F
r1918 r1944 1 SUBROUTINE surfini(ngrid,piceco2,qsurf ,psolaralb)1 SUBROUTINE surfini(ngrid,piceco2,qsurf) 2 2 3 3 USE ioipsl_getincom, only: getin … … 12 12 use mod_phys_lmdz_para, only : is_master, gather, scatter 13 13 #endif 14 USE comcstfi_h 14 USE comcstfi_h, ONLY: pi 15 15 use mod_grid_phy_lmdz, only: nbp_lon, nbp_lat 16 16 use datafile_mod, only: datadir … … 29 29 real,intent(in) :: piceco2(ngrid) ! CO2 ice thickness 30 30 real,intent(inout) :: qsurf(ngrid,nqmx) ! tracer on surface (kg/m2) 31 real,intent(out) :: psolaralb(ngrid,2) ! albedo32 31 33 32 INTEGER ig,icap,iq,alternate … … 458 457 call scatter(watercaptag_glo,watercaptag) 459 458 460 ! end of #else of #ifdef MESOSCALE461 ENDIF ! (caps & water)462 #endif463 464 c ===============================================================465 c INITIAL ALBEDO466 c ===============================================================467 468 write(*,*)"surfini: water frost thickness",469 s frost_albedo_threshold470 write(*,*)"surfini: water ice albedo:", albedo_h2o_ice471 write(*,*)"surfini: water ice TI:", inert_h2o_ice472 473 c To start with : Initial albedo = observed dataset474 c -------------------------------------------------475 DO ig=1,ngrid476 psolaralb(ig,1)=albedodat(ig)477 psolaralb(ig,2)=albedodat(ig)478 END DO479 PRINT*,'surfini: minimum albedo without water caps',480 & minval(albedodat)481 PRINT*,'surfini: maximum albedo without water caps',482 & maxval(albedodat)483 484 c initial albedo if permanent H2O ice is present485 c ------------------------------------------------486 IF ((water) .and. (caps)) THEN487 DO ig=1,ngrid488 IF (watercaptag(ig)) THEN489 psolaralb(ig,1) = albedo_h2o_ice490 psolaralb(ig,2) = albedo_h2o_ice491 ENDIF492 END DO493 PRINT*,'surfini: minimum albedo with water caps',494 & minval(albedodat)495 PRINT*,'surfini: maximum albedo with water caps',496 & maxval(albedodat)497 498 ENDIF499 500 c changing initial albedo if CO2 ice is present501 c -------------------------------------------502 503 DO ig=1,ngrid504 IF (piceco2(ig) .GT. 0.) THEN505 IF(latitude(ig).LT. 0.) THEN506 icap=2 ! Southern hemisphere507 ELSE508 icap=1 ! Northern hemisphere509 ENDIF510 psolaralb(ig,1) = albedice(icap)511 psolaralb(ig,2) = albedice(icap)512 END IF513 END DO514 515 c changing initial albedo if water ice frost is present516 c -------------------------------------------517 IF (water) THEN518 do iq=1,nqmx519 c if there is frost and surface albedo is set to albedo_h2o_ice520 if(noms(iq).eq."h2o_ice") then521 do ig=1,ngrid522 523 if ((watercaptag(ig).eqv..false.)524 & .and. (qsurf(ig,iq).lt.-frost_albedo_threshold)) then525 print*, ''526 print*, '!!! PROBLEM in SURFINI !!!!'527 print*, 'FOUND NEGATIVE SURFACE ICE VALUE WHERE528 & WATERCAPTAG IS FALSE'529 print*, ''530 print*, 'ig,qsurf,threshold' ,531 & ig, qsurf(ig,iq), -frost_albedo_threshold532 print*, ''533 print*, '1) Check h2o_ice in startfi and ice534 & distribution in surfini'535 print*, '2) Use ini_h2osurf option in newstart'536 print*, ''537 #ifndef MESOINI538 CALL ABORT539 #else540 qsurf(ig,iq) = 0.541 #endif542 endif543 544 if ((piceco2(ig) .eq. 0.).and.545 & (qsurf(ig,iq).gt.frost_albedo_threshold)) then546 psolaralb(ig,1) = albedo_h2o_ice547 psolaralb(ig,2) = albedo_h2o_ice548 c PRINT*,'surfini.F frost',549 c & latitude(ig)*180./pi, longitude(ig)*180./pi550 endif551 enddo552 endif553 end do554 PRINT*,'surfini: minimum albedo with frost and co2',555 & minval(albedodat)556 PRINT*,'surfini: maximum albedo with frost and co2',557 & maxval(albedodat)558 459 ELSE 559 460 watercaptag(:) = .false. 560 END IF ! OF IF(water) 561 562 RETURN 461 ENDIF ! (caps & water) 462 ! end of #else of #ifndef MESOSCALE 463 #endif 464 563 465 END -
trunk/LMDZ.MARS/libf/phymars/vdifc.F
r1779 r1944 36 36 c ------------- 37 37 38 #include "callkeys.h"39 #include "microphys.h"38 include "callkeys.h" 39 include "microphys.h" 40 40 41 41 c … … 66 66 c Argument added to account for subgrid gustiness : 67 67 68 REAL wstar(ngrid), hfmax(ngrid)!, zi(ngrid)68 REAL,INTENT(IN) :: wstar(ngrid), hfmax(ngrid)!, zi(ngrid) 69 69 70 70 c Traceurs :
Note: See TracChangeset
for help on using the changeset viewer.