- Timestamp:
- Mar 12, 2014, 4:30:18 PM (11 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 8 edited
- 3 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r1207 r1208 2000 2000 to be done in newstart, and that these values be stored in startfi.nc 2001 2001 2002 == 12/03/2014 == TN 2003 - Added tauscaling (the conversion factor from virtual to real dust) in startfi.nc file. 2004 It is needed for 3 cases: 2005 1. Compute ice particles size when using microphysics on the first physics step 2006 before the call to the radiative transfer (updatereffrad) 2007 2. The conversion to real dust values with newstart, to be used for the freedust mode. 2008 3. It brings the necessary information for the calculation of the dust 3D opacity 2009 from start & startfi files only when using virtual dust. 2010 If tauscaling is not present, the default value is 10^-3 everywhere when needed. 2011 If the freedust mode is used, tauscaling is equal to 1 everywhere. 2012 Modified accordingly startfi and start_archive writing and reading routines. 2013 2014 -
trunk/LMDZ.MARS/libf/phymars/aeropacity.F
r1104 r1208 120 120 c when computing the dust opacity in each layer 121 121 c (this applies when doubleq and active are true) 122 INTEGER, PARAMETER :: cstdustlevel = 7 122 INTEGER, PARAMETER :: cstdustlevel0 = 7 123 INTEGER, SAVE :: cstdustlevel 123 124 124 125 LOGICAL,SAVE :: firstcall=.true. … … 198 199 ! otherwise default value read from starfi.nc file will be used) 199 200 call getin("tauvis",tauvis) 201 202 IF (freedust) THEN 203 cstdustlevel = 1 204 ELSE 205 cstdustlevel = cstdustlevel0 206 ENDIF 207 200 208 201 209 firstcall=.false. … … 454 462 tauscaling(ig) = tauref(ig) * 455 463 & pplev(ig,1) / odpref / taudusttmp(ig) 456 c tauscaling(ig) = 1.e-4457 464 ENDDO 458 465 … … 470 477 471 478 IF (freedust) THEN 472 ! tauref has been initialized to 0 before. 473 DO iaer=1,naerdust 474 DO l=1,nlayer 475 DO ig=1,ngrid 476 tauref(ig) = tauref(ig) + 477 & aerosol(ig,l,iaerdust(iaer)) 478 ENDDO 479 ENDDO 480 ENDDO 479 ! tauref has been initialized to 0 before. 480 DO iaer=1,naerdust 481 DO l=1,nlayer 482 DO ig=1,ngrid 483 tauref(ig) = tauref(ig) + 484 & aerosol(ig,l,iaerdust(iaer)) 485 ENDDO 486 ENDDO 487 ENDDO 488 tauref(:) = tauref(:) * odpref / pplev(:,1) 481 489 ENDIF 482 490 -
trunk/LMDZ.MARS/libf/phymars/lect_start_archive.F
r1207 r1208 2 2 & date,tsurf,tsoil,emis,q2, 3 3 & t,ucov,vcov,ps,co2ice,h,phisold_newgrid, 4 & q,qsurf, surfith,nid)4 & q,qsurf,tauscaling,surfith,nid) 5 5 c======================================================================= 6 6 c … … 109 109 REAL emis(ngrid) 110 110 REAL q2(ngrid,nlayer+1),qsurf(ngrid,nqtot) 111 REAL tauscaling(ngrid) ! dust conversion factor 111 112 c REAL phisfi(ngrid) 112 113 … … 136 137 real co2iceS(iip1,jjp1),emisS(iip1,jjp1) 137 138 REAL q2S(iip1,jjp1,llm+1),qsurfS(iip1,jjp1,nqtot) 139 real tauscalingS(iip1,jjp1) 138 140 139 141 real ptotal, co2icetotal … … 163 165 real, dimension(:,:), allocatable :: emisold 164 166 real, dimension(:,:,:,:), allocatable :: qold 167 real, dimension(:,:), allocatable :: tauscalingold 165 168 166 169 real tab_cntrl(100) … … 337 340 allocate(mlayerold(nsoilold)) 338 341 allocate(qsurfold(imold+1,jmold+1,nqtot)) 342 allocate(tauscalingold(imold+1,jmold+1)) 339 343 340 344 allocate(var (imold+1,jmold+1,llm)) … … 662 666 663 667 c----------------------------------------------------------------------- 664 c 5.1 Lecture des champs 2D (co2ice, emis,ps,tsurf,Tg[10], q2surf )668 c 5.1 Lecture des champs 2D (co2ice, emis,ps,tsurf,Tg[10], q2surf, tauscaling) 665 669 c----------------------------------------------------------------------- 666 670 … … 742 746 PRINT*, "lect_start_archive: Failed loading <q2surf>" 743 747 CALL abort 748 ENDIF 749 c 750 ierr = NF_INQ_VARID (nid, "tauscaling", nvarid) 751 IF (ierr .NE. NF_NOERR) THEN 752 PRINT*, "lect_start_archive: <tauscaling> not in file" 753 tauscalingold(:,:) = -1 754 ELSE 755 #ifdef NC_DOUBLE 756 ierr = NF_GET_VARA_DOUBLE(nid, nvarid,start,count,tauscalingold) 757 #else 758 ierr = NF_GET_VARA_REAL(nid, nvarid,start,count,tauscalingold) 759 #endif 760 IF (ierr .NE. NF_NOERR) THEN 761 PRINT*, "lect_start_archive: Failed loading <tauscaling>" 762 PRINT*, NF_STRERROR(ierr) 763 CALL abort 764 ENDIF 744 765 ENDIF 745 766 c … … 1019 1040 call interp_horiz (emisold,emiss,imold,jmold,iim,jjm,1, 1020 1041 & rlonuold,rlatvold,rlonu,rlatv) 1021 call gr_dyn_fi (1,iim+1,jjm+1,ngrid,emiss,emis) 1042 c Dust conversion factor 1043 call interp_horiz (tauscalingold,tauscalings,imold,jmold,iim,jjm, 1044 & 1,rlonuold,rlatvold,rlonu,rlatv) 1045 call gr_dyn_fi (1,iim+1,jjm+1,ngrid,tauscalings,tauscaling) 1022 1046 c write(46,*) 'emis',emis 1023 1047 c----------------------------------------------------------------------- … … 1378 1402 deallocate(mlayerold) 1379 1403 deallocate(qsurfold) 1404 deallocate(tauscalingold) 1380 1405 deallocate(var,varp1) 1381 1406 -
trunk/LMDZ.MARS/libf/phymars/newstart.F
r1130 r1208 109 109 REAL co2ice(ngridmx) ! CO2 ice layer 110 110 REAL emis(ngridmx) ! surface emissivity 111 REAL tauscaling(ngridmx) ! dust conversion factor 112 REAL tauscadyn(iip1,jjp1) ! dust conversion factor on the dynamics grid 111 113 REAL,ALLOCATABLE :: qsurf(:,:) 112 114 REAL q2(ngridmx,nlayermx+1) … … 426 428 & date,tsurf,tsoil,emis,q2, 427 429 & t,ucov,vcov,ps,co2ice,teta,phisold_newgrid,q,qsurf, 428 & surfith,nid)430 & tauscaling,surfith,nid) 429 431 write(*,*) "OK, read start_archive file" 430 432 ! copy soil thermal inertia … … 447 449 CALL phyetat0 (fichnom,tab0,Lmodif,nsoilmx,ngridmx,llm,nqtot, 448 450 . day_ini,time, 449 . tsurf,tsoil,emis,q2,qsurf,co2ice )451 . tsurf,tsoil,emis,q2,qsurf,co2ice,tauscaling) 450 452 451 453 ! copy albedo and soil thermal inertia … … 858 860 endif 859 861 860 c q=profile : initialize tracer with a given profile862 c convert dust from virtual to true values 861 863 c -------------------------------------------------- 862 864 else if (trim(modif) .eq. 'freedust') then 865 if (minval(tauscaling) .lt. 0) then 866 write(*,*) 'WARNING conversion factor negative' 867 write(*,*) 'This is probably because it was not present 868 &in the file' 869 write(*,*) 'A constant conversion is used instead.' 870 tauscaling(:) = 1.e-3 871 endif 872 CALL gr_fi_dyn(1,ngridmx,iip1,jjp1,tauscaling,tauscadyn) 863 873 do l=1,llm 864 874 do j=1,jjp1 865 875 do i=1,iip1 866 876 if (igcm_dust_number .ne. 0) 867 & q(i,j,l,igcm_dust_number)=868 & q(i,j,l,igcm_dust_number) * 1e-3 ! grosso modo877 & q(i,j,l,igcm_dust_number) = 878 & q(i,j,l,igcm_dust_number) * tauscadyn(i,j) 869 879 if (igcm_dust_mass .ne. 0) 870 & q(i,j,l,igcm_dust_mass)=871 & q(i,j,l,igcm_dust_mass) * 1e-3 ! grosso modo880 & q(i,j,l,igcm_dust_mass) = 881 & q(i,j,l,igcm_dust_mass) * tauscadyn(i,j) 872 882 if (igcm_ccn_number .ne. 0) 873 & q(i,j,l,igcm_ccn_number)=874 & q(i,j,l,igcm_ccn_number) * 1e-3 ! grosso modo883 & q(i,j,l,igcm_ccn_number) = 884 & q(i,j,l,igcm_ccn_number) * tauscadyn(i,j) 875 885 if (igcm_ccn_mass .ne. 0) 876 & q(i,j,l,igcm_ccn_mass)=877 & q(i,j,l,igcm_ccn_mass) * 1e-3 ! grosso modo886 & q(i,j,l,igcm_ccn_mass) = 887 & q(i,j,l,igcm_ccn_mass) * tauscadyn(i,j) 878 888 end do 879 889 end do 880 890 end do 891 892 tauscaling(:) = 1. 881 893 882 894 ! We want to have the very same value at lon -180 and lon 180 … … 888 900 end do 889 901 end do 902 903 write(*,*) 'done rescaling to true vale' 890 904 891 905 c ini_q : Initialize tracers for chemistry … … 1529 1543 call physdem1("restartfi.nc",nsoilmx,ngridmx,llm,nqtot, 1530 1544 . dtphys,hour_ini, 1531 . tsurf,tsoil,co2ice,emis,q2,qsurf )1545 . tsurf,tsoil,co2ice,emis,q2,qsurf,tauscaling) 1532 1546 1533 1547 c======================================================================= -
trunk/LMDZ.MARS/libf/phymars/phyetat0.F90
r1130 r1208 1 1 subroutine phyetat0 (fichnom,tab0,Lmodif,nsoil,ngrid,nlay,nq, & 2 day_ini,time0,tsurf,tsoil,emis,q2,qsurf,co2ice )3 2 day_ini,time0,tsurf,tsoil,emis,q2,qsurf,co2ice, & 3 tauscaling) 4 4 ! use netcdf 5 5 use infotrac, only: nqtot, tname … … 57 57 real,intent(out) :: qsurf(ngrid,nq) ! tracers on surface 58 58 real,intent(out) :: co2ice(ngrid) ! co2 ice cover 59 real,intent(out) :: tauscaling(ngrid) ! dust conversion factor 59 60 60 61 !====================================================================== … … 236 237 237 238 239 ! Dust conversion factor 240 call get_field("tauscaling",tauscaling,found,indextime) 241 if (.not.found) then 242 write(*,*) "phyetat0: <tauscaling> not in file" 243 tauscaling(:) = -1 244 else 245 write(*,*) "phyetat0: dust conversion factor <tauscaling> range:", & 246 minval(tauscaling), maxval(tauscaling) 247 endif 248 249 238 250 ! Surface temperature : 239 251 call get_field("tsurf",tsurf,found,indextime) -
trunk/LMDZ.MARS/libf/phymars/phyredem.F90
r1130 r1208 143 143 144 144 subroutine physdem1(filename,nsoil,ngrid,nlay,nq, & 145 phystep,time,tsurf,tsoil,co2ice,emis,q2,qsurf) 145 phystep,time,tsurf,tsoil,co2ice,emis,q2,qsurf,& 146 tauscaling) 146 147 ! write time-dependent variable to restart file 147 148 use iostart, only : open_restartphy, close_restartphy, & … … 162 163 real,intent(in) :: q2(ngrid,nlay+1) 163 164 real,intent(in) :: qsurf(ngrid,nq) 165 real,intent(in) :: tauscaling(ngrid) 164 166 165 167 integer :: iq … … 192 194 call put_field("q2","pbl wind variance",q2,time) 193 195 196 ! Dust conversion factor 197 ! Only to be read by newstart to convert to actual dust values 198 ! Or by any user who wants to reconstruct dust, opacity from the start files. 199 call put_field("tauscaling","dust conversion factor",tauscaling,time) 200 194 201 ! Tracers on the surface 195 202 ! preliminary stuff: look for water vapour & water ice tracers (if any) -
trunk/LMDZ.MARS/libf/phymars/physiq.F
r1130 r1208 436 436 & nsoilmx,ngrid,nlayer,nq, 437 437 & day_ini,time_phys, 438 & tsurf,tsoil,emis,q2,qsurf,co2ice )438 & tsurf,tsoil,emis,q2,qsurf,co2ice,tauscaling) 439 439 #else 440 440 #include "meso_inc/meso_inc_ini.F" … … 1582 1582 call physdem1("restartfi.nc",nsoilmx,ngrid,nlayer,nq, 1583 1583 . ptimestep,ztime_fin, 1584 . tsurf,tsoil,co2ice,emis,q2,qsurf )1584 . tsurf,tsoil,co2ice,emis,q2,qsurf,tauscaling) 1585 1585 1586 1586 ENDIF … … 2136 2136 c call WRITEDIAGFI(ngrid,'dqsdif','diffusion', 2137 2137 c & 'kg.m-2.s-1',2,zdqsdif(1,1)) 2138 c call WRITEDIAGFI(ngrid,'sedice','sedimented ice', 2139 c & 'kg.m-2.s-1',2,zdqssed(:,igcm_h2o_ice)) 2140 c call WRITEDIAGFI(ngrid,'subice','sublimated ice', 2141 c & 'kg.m-2.s-1',2,zdqsdif(:,igcm_h2o_ice)) 2138 2142 call WRITEDIAGFI(ngrid,'dqsdust', 2139 2143 & 'deposited surface dust mass', … … 2148 2152 call WRITEDIAGFI(ngrid,'dustN','Dust number', 2149 2153 & 'part/kg',3,ndust) 2154 c call WRITEDIAGFI(ngrid,"tauscaling", 2155 c & "dust conversion factor"," ",2,tauscaling) 2150 2156 #ifdef MESOINI 2151 2157 ! !!! to initialize mesoscale we need scaled variables -
trunk/LMDZ.MARS/libf/phymars/start2archive.F
r1130 r1208 67 67 REAL tsoil(ngridmx,nsoilmx) ! Soil temperature 68 68 REAL co2ice(ngridmx) ! CO2 ice layer 69 REAL tauscaling(ngridmx) ! dust conversion factor 69 70 REAL q2(ngridmx,llm+1) 70 71 REAL,ALLOCATABLE :: qsurf(:,:) … … 82 83 REAL ithS(ip1jmp1,nsoilmx) ! Soil Thermal Inertia 83 84 REAL co2iceS(ip1jmp1) 85 REAL tauscalingS(ip1jmp1) 84 86 REAL q2S(ip1jmp1,llm+1) 85 87 REAL,ALLOCATABLE :: qsurfS(:,:) … … 147 149 148 150 CALL phyetat0 (fichnom,0,Lmodif,nsoilmx,ngridmx,llm,nqtot, 149 & day_ini_fi,timefi,tsurf,tsoil,emis,q2,qsurf,co2ice) 151 & day_ini_fi,timefi,tsurf,tsoil,emis,q2,qsurf,co2ice, 152 & tauscaling) 150 153 151 154 ierr = NF_OPEN (fichnom, NF_NOWRITE,nid1) … … 242 245 c q2 --> q2S 243 246 c qsurf --> qsurfS 247 c tauscaling --> tauscalingS 244 248 c 245 249 c----------------------------------------------------------------------- … … 253 257 call gr_fi_dyn(llm+1,ngridmx,iip1,jjp1,q2,q2S) 254 258 call gr_fi_dyn(nqtot,ngridmx,iip1,jjp1,qsurf,qsurfS) 259 call gr_fi_dyn(1,ngridmx,iip1,jjp1,tauscaling,tauscalingS) 255 260 256 261 c======================================================================= … … 341 346 call write_archive(nid,ntime,'co2ice','couche de glace co2', 342 347 & 'kg/m2',2,co2iceS) 348 call write_archive(nid,ntime,'tauscaling', 349 & 'dust conversion factor',' ',2,tauscalingS) 343 350 call write_archive(nid,ntime,'emis','grd emis',' ',2,emisS) 344 351 call write_archive(nid,ntime,'ps','Psurf','Pa',2,ps) -
trunk/LMDZ.MARS/libf/phymars/updatereffrad.F
r1047 r1208 128 128 IF (water.AND.activice) THEN 129 129 IF (microphys) THEN 130 131 IF (firstcall) THEN 132 DO l=1,nlayer 133 DO ig=1,ngrid 134 call updaterice_micro(pq(ig,l,igcm_h2o_ice), 135 & pq(ig,l,igcm_ccn_mass), 136 & pq(ig,l,igcm_ccn_number), 137 & 1.e-3,rice(ig,l), 138 & rhocloud(ig,l)) 139 nuice(ig,l) = nuice_ref 140 ENDDO 141 ENDDO 142 firstcall = .false. 130 143 131 c At firstcall, the true number and true mass of cloud condensation nuclei are not known. 144 132 c Indeed it is scaled on the prescribed dust opacity via a 'tauscaling' coefficient 145 c computed after radiative transfer. 146 ELSE 147 DO l=1,nlayer 148 DO ig=1,ngrid 149 call updaterice_micro(pq(ig,l,igcm_h2o_ice), 150 & pq(ig,l,igcm_ccn_mass), 151 & pq(ig,l,igcm_ccn_number), 152 & tauscaling(ig),rice(ig,l), 153 & rhocloud(ig,l)) 154 nuice(ig,l) = nuice_ref 155 ENDDO 156 ENDDO 157 ENDIF ! of if firstcall 133 c computed after radiative transfer. If tauscaling is not in startfi, we make an assumption for its value. 134 135 IF (firstcall) THEN 136 IF (minval(tauscaling).lt.0) tauscaling(:) = 1.e-3 ! default value when non-read in startfi is -1 137 IF (freedust) tauscaling(:) = 1. ! if freedust, enforce no rescaling at all 138 firstcall = .false. 139 ENDIF 140 141 DO l=1,nlayer 142 DO ig=1,ngrid 143 call updaterice_micro(pq(ig,l,igcm_h2o_ice), 144 & pq(ig,l,igcm_ccn_mass), 145 & pq(ig,l,igcm_ccn_number), 146 & tauscaling(ig),rice(ig,l), 147 & rhocloud(ig,l)) 148 nuice(ig,l) = nuice_ref 149 ENDDO 150 ENDDO 158 151 159 152 ELSE ! if not microphys
Note: See TracChangeset
for help on using the changeset viewer.