Changeset 4473


Ignore:
Timestamp:
06/24/19 13:46:05 (5 years ago)
Author:
tlurton
Message:

Adapted volc.sh script to possibility of VLR-L39 resolution, with necessary auxiliary files.

Location:
TOOLS/CMIP6_FORCING/AER_STRAT
Files:
3 added
2 edited

Legend:

Unmodified
Added
Removed
  • TOOLS/CMIP6_FORCING/AER_STRAT/README

    r4183 r4473  
    5959Revised 18/09/2018 
    6060Revised 11/12/2018 
     61Revised 06/2019 by Th. Lurton to add support for VLR-L39. 
  • TOOLS/CMIP6_FORCING/AER_STRAT/volc.sh

    r4183 r4473  
    11dirpwd=`pwd` 
    22 
    3 vv='v3' 
     3vv='v4' 
    44 
    55#--choose the resolution 
     
    88#lmdz='VLR_L79' 
    99#lmdz='VLR' 
    10 #lmdz='LR' 
    11 lmdz='MR' 
     10lmdz='LR' 
     11#lmdz='MR' 
    1212#--added for Frederique Cheruy 
    1313#lmdz='zoom_128x89' 
     
    9999;--script only works on ciclad 
    100100dir='/prodigfs/project/input4MIPs/VOLC/${vv}/' 
    101 filename=dir+'CMIP_1850_2014_extinction_550nm_${vv}.nc' 
    102 NETCDFREAD,filename,'altitude',altitude,dimaltitude 
    103 NETCDFREAD,filename,'ext550',ext550,dimext 
     101;;;not available for v4 
     102;;;filename=dir+'CMIP_1850_2014_extinction_550nm_${vv}.nc' 
     103;;;NETCDFREAD,filename,'altitude',altitude,dimaltitude 
     104;;;NETCDFREAD,filename,'ext550',ext550,dimext 
    104105; 
    105106filename=dir+'CMIP_IPSL-CM6_radiation_${vv}.nc' 
     
    188189endif 
    189190; 
     191if (dimz eq 39) then begin 
     192  filename='./zalt_zonmean_${lmdz}_l39_rev.nc' 
     193  NETCDFREAD,filename,'GEOP',zz,dimzz 
     194  NETCDFREAD,filename,'LAT',zzlat,dimzzlat 
     195  NETCDFREAD,filename,'TIME_COUNTER',zztime,dimzztime 
     196  dimzzilat=dimzzlat[0] 
     197  dimzzitime=dimzztime[0] 
     198  ;--becareful zz comes with four dimensions 
     199  ;--lon lat k time 
     200  print, 'GEOP size=', size(zz) 
     201  ;--becareful zzlat comes with South Pole first 
     202  print, 'LAT from zalt field=', zzlat 
     203  if (dimzzilat ne dimlatlmdz) then begin 
     204    print , 'PB dimension latitude' 
     205  endif 
     206endif 
     207; 
    190208; 
    191209;--reconstructing the vertical coordinate at interfaces (in unit km) 
     
    216234; 
    217235;--550 nm properties 
    218 tau_550_lmdz=fltarr(dimlatlmdz,dimz,month_in_year) 
     236;;;not available for v4 
     237;;;tau_550_lmdz=fltarr(dimlatlmdz,dimz,month_in_year) 
    219238; 
    220239;--SW properties 
     
    243262tau_ear_lmdz_ave(*,*,*,0)=1.e-15 
    244263; 
    245 for year=0, dimtime/month_in_year-1 do begin 
    246 ; 
    247 tau_550_lmdz(*,*,*)=1.e-15 
     264yearend=dimtime/month_in_year-1 
     265; 
     266for year=0, yearend do begin 
     267; 
     268;;;not available for v4 
     269;;;tau_550_lmdz(*,*,*)=1.e-15 
    248270tau_sun_lmdz(*,*,*,*)=1.e-15 
    249271ome_sun_lmdz(*,*,*,*)=1.e-15 
     
    276298frac= max([0.0,min([zzi(j,mth,k+1),zziori(kori+1)])-max([zzi(j,mth,k),zziori(kori)])])/(zziori(kori+1)-zziori(kori)) 
    277299; 
    278 tau_550_lmdz(j,k,mth)=tau_550_lmdz(j,k,mth)+ext550(l,kori,jj)*dz*frac 
     300;;;not available for v4 
     301;;;tau_550_lmdz(j,k,mth)=tau_550_lmdz(j,k,mth)+ext550(l,kori,jj)*dz*frac 
    279302; 
    280303for nl=0, NSW-1 do begin 
     
    376399            attributes=attributes, dimensions=dimensions 
    377400; 
    378 opticstruct={lat:fltarr(dimlatlmdz),lev:fltarr(dimz),             $  
    379              time:fltarr(month_in_year),                          $ 
    380              tau550:fltarr(dimlatlmdz,dimz,month_in_year) } 
    381 ; 
    382 opticstruct.lat=latitudelmdz 
    383 opticstruct.lev=lev 
    384 opticstruct.time=float(indgen(month_in_year)+1) 
    385 opticstruct.tau550=tau_550_lmdz 
    386 ; 
    387 attributes = {units:strarr(4),long_name:strarr(4)} 
    388 attributes.units = ['degrees_north','level','month','-'] 
    389 attributes.long_name = ['latitude','level','time','tau550'] 
    390 ; 
    391 dimensions = {isdim:intarr(4), links:intarr(3,4)} 
    392        dimensions.isdim =  [1,1,1,0]  ; (1=dimension, 0=variable) 
    393        dimensions.links = [ [-1,-1,-1],[-1,-1,-1],   $ 
    394                             [-1,-1,-1],[0,1,2]  ] 
    395 ; 
    396 netcdfwrite,output+'tau550strat.2D.'+chyr+'.nc',opticstruct,clobber=1, $ 
    397             attributes=attributes, dimensions=dimensions 
     401;;;not available in v4 
     402;;;opticstruct={lat:fltarr(dimlatlmdz),lev:fltarr(dimz),             $  
     403;;;             time:fltarr(month_in_year),                          $ 
     404;;;             tau550:fltarr(dimlatlmdz,dimz,month_in_year) } 
     405; 
     406;;;opticstruct.lat=latitudelmdz 
     407;;;opticstruct.lev=lev 
     408;;;opticstruct.time=float(indgen(month_in_year)+1) 
     409;;;opticstruct.tau550=tau_550_lmdz 
     410; 
     411;;;attributes = {units:strarr(4),long_name:strarr(4)} 
     412;;;attributes.units = ['degrees_north','level','month','-'] 
     413;;;attributes.long_name = ['latitude','level','time','tau550'] 
     414; 
     415;;;dimensions = {isdim:intarr(4), links:intarr(3,4)} 
     416;;;       dimensions.isdim =  [1,1,1,0]  ; (1=dimension, 0=variable) 
     417;;;       dimensions.links = [ [-1,-1,-1],[-1,-1,-1],   $ 
     418;;;                            [-1,-1,-1],[0,1,2]  ] 
     419; 
     420;;;netcdfwrite,output+'tau550strat.2D.'+chyr+'.nc',opticstruct,clobber=1, $ 
     421;;;            attributes=attributes, dimensions=dimensions 
    398422; 
    399423endfor 
     
    463487            attributes=attributes, dimensions=dimensions 
    464488; 
    465 ;--finally prepare the transition period 2015-2023 
     489;--finally prepare the 10-year transition period  
     490;--that is 2015-2023 for v3 or 2017-2025 for v4 
    466491;--we mix the last year of the period with the climatology 
    467492; 
    468 for year=2015,2023 do begin 
     493for year=1850+yearend+1,1850+yearend+9 do begin 
    469494; 
    470495chyr=strcompress(year,/rem) 
     496print,'year =',chyr 
    471497;--compute weights 
    472 w1=float(2024-year)/10. 
     498w1=float(1850+yearend+10-year)/10. 
    473499w2=1.0-w1 
    474500;--SW properties 
     
    552578cd $dirpwd 
    553579 
     580module load idl 
     581 
    554582idl << eof 
    555583.r netcdf  
Note: See TracChangeset for help on using the changeset viewer.