Changeset 2435
- Timestamp:
- Nov 23, 2020, 11:50:01 AM (4 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2434 r2435 3235 3235 - extend size of long_name character string (ticket #57) 3236 3236 - remove the use of #ifdef NC_DOUBLE (ticket #67) 3237 3238 == 23/11/2020 == AB 3239 Add stormdust in the aerosol opacities computed by aeroptical.F90 3240 + add a description of aeroptical in util/README -
trunk/LMDZ.MARS/util/README
r2432 r2435 22 22 This program is used to concatenate consecutive 23 23 output files ("diagfi", and even "stats") for a selection of 24 variable, in order to obtain one single big file. The time simension can24 variable, in order to obtain one single big file. The time dimension can 25 25 be "sols" or "Ls" (in that last case, Ls will not be linear, and 26 26 software like Grads may not be able to use it. To have a linear "Ls" … … 187 187 extract.e < extract.points.def 188 188 189 189 -------------------------------------------------------------------- 190 9) aeroptical.e : compute aerosol opacities at a given wavelength 191 -------------------------------------------------------------------- 192 193 Program to compute opacities [1/km] of all aerosols from dust, water ice 194 and stormdust present in the input file, at a wavelength given by the user. 195 Computation is made from the aerosol mass mixing ratios and effective radius, 196 associated with air density (rho) and files containing the aerosol 197 optical properties (generally present in the GCM datadir/ directory). 198 199 NB : water ice effective radius is known to be a bit inaccurate in the GCM, 200 so reffwice can be prescribed by the user. 201 202 input : diagfi.nc / concat.nc / stats.nc kind of files 203 204 output file is : name_of_input_file_OPA.nc 205 aeroptical.e < aeroptical.def -
trunk/LMDZ.MARS/util/aeroptical.F90
r2327 r2435 8 8 ! This program takes as inputs a GCM output file (diagfi,stats,concat) that 9 9 ! contains: 10 ! - the Mass Mixing Ratios of dust (dustq) and water ice (h2o_ice) 11 ! - their effective radius (reffdust, reffice(*)) 10 ! - the Mass Mixing Ratios of dust (dustq), water ice (h2o_ice) 11 ! & stormdust (rdsdustq) 12 ! - their effective radius (reffdust, reffice(*), reffstormdust) 12 13 ! - the atmospheric density (rho) 13 14 ! as well as a wavelength to calibrate the opacities, and the directory 14 15 ! containing the ASCII files of the aerosols' optical properties. 15 16 ! 16 ! It outputs a netcdf file containing the opacities [1/km] of the dust and17 ! water ice a erosols calibrated at the prescribed wavelength.17 ! It outputs a netcdf file containing the opacities [1/km] of the dust, 18 ! water ice and stormdust aerosols calibrated at the prescribed wavelength. 18 19 ! 19 20 ! … … 56 57 real,dimension(:,:,:,:),allocatable :: rho ! atmospheric density [kg.m-3] 57 58 integer :: naerkind ! nb of aerosols to consider 58 integer :: iaer ! aerosol kind index (1=dust, 2=water ice ) ! + NEW AER?59 integer :: iaer ! aerosol kind index (1=dust, 2=water ice, 3=stormdust) ! + NEW AER? 59 60 integer :: ilon,ilat,ialt,it ! Loop indices for coordinates 60 61 … … 174 175 175 176 ! Number of aerosols 176 naerkind = 2 ! dust & water ice! + NEW AER?177 naerkind = 3 ! dust, water ice, stormdust ! + NEW AER? 177 178 178 179 ! Length allocation of the variables … … 288 289 289 290 !========================================================================== 290 ! --> 1.2.3 + NEW AER? 291 292 !========================================================================== 293 ! --> 1.2.3 ATMOSPHERIC DENSITY 291 ! --> 1.2.3 STORMDUST 292 293 ! STORMDUST MASS MIXING RATIO 294 ! Check that the GCM file contains that variable 295 ierr=nf90_inq_varid(gcmfid,"rdsdustq",tmpvarid) 296 error_text="Failed to find variable rdsdustq in "//trim(gcmfile)& 297 //" We'll skip the stormdust aerosol." 298 if (ierr.ne.nf90_noerr) then 299 write(*,*)trim(error_text) 300 aerok(3)=.false. 301 else 302 ! Load datasets 303 ierr=NF90_GET_VAR(gcmfid,tmpvarid,mmr(3,:,:,:,:)) 304 error_text="Failed to load stormdust mass mixing ratio" 305 call status_check(ierr,error_text) 306 write(*,*) "Stormdust mass mixing ratio loaded from "//trim(gcmfile) 307 ! Get missing value 308 ierr=nf90_get_att(gcmfid,tmpvarid,"missing_value",missval(3)) 309 if (ierr.ne.nf90_noerr) then 310 missval(3) = 1.e+20 311 endif 312 endif 313 314 ! STORMDUST EFFECTIVE RADIUS 315 if (aerok(3)) then 316 ! Check that the GCM file contains that variable 317 ierr=nf90_inq_varid(gcmfid,"reffstormdust",tmpvarid) 318 error_text="Failed to find variable reffstormdust in "//trim(gcmfile)& 319 //" We'll skip the dust aerosol." 320 if (ierr.ne.nf90_noerr) then 321 write(*,*)trim(error_text) 322 aerok(3)=.false. 323 else 324 ! Load datasets 325 ierr=NF90_GET_VAR(gcmfid,tmpvarid,reff(3,:,:,:,:)) 326 error_text="Failed to load stormdust effective radius" 327 call status_check(ierr,error_text) 328 write(*,*) "Stormdust effective radius loaded from "//trim(gcmfile) 329 endif 330 endif 331 332 333 !========================================================================== 334 ! --> 1.2.4 + NEW AER? 335 336 337 !========================================================================== 338 ! --> 1.2.5 ATMOSPHERIC DENSITY 294 339 295 340 ! Check that the GCM file contains that variable … … 319 364 rho_aer(1)=2500. ! dust 320 365 rho_aer(2)=920. ! water ice 366 rho_aer(3)=2500. ! stormdust 321 367 ! + NEW AER? 322 368 … … 344 390 ! Water ice file 345 391 optpropfile = "optprop_icevis_n30.dat" 392 CASE(3) ! STORMDUST 393 ! Dust file 394 optpropfile = "optprop_dustvis_TM_n50.dat" 346 395 ! + NEW AER? 347 396 END SELECT ! iaer … … 357 406 ! Water ice file 358 407 optpropfile = "optprop_iceir_n30.dat" 408 CASE(3) ! STORMDUST 409 ! Dust file 410 optpropfile = "optprop_dustir_n50.dat" 359 411 ! + NEW AER? 360 412 END SELECT ! iaer … … 540 592 ! Write the attributes 541 593 ierr=nf90_put_att(outfid,tmpvaridout,"long_name","Water ice extinction opacity at reference wavelength") 594 595 CASE(3) ! STORMDUST 596 ! Insert the definition of the variable 597 tmpvarname="opastormdust" 598 ierr=NF90_DEF_VAR(outfid,trim(tmpvarname),nf90_float,varshape,tmpvaridout) 599 error_text="ERROR: Couldn't create "//trim(tmpvarname)//" in the outfile" 600 call status_check(ierr,error_text) 601 write(*,*) trim(tmpvarname)//" has been created in the outfile" 602 603 ! Write the attributes 604 ierr=nf90_put_att(outfid,tmpvaridout,"long_name","Stormdust extinction opacity at reference wavelength") 542 605 543 606 ! + NEW AER?
Note: See TracChangeset
for help on using the changeset viewer.