- Timestamp:
- 08/11/11 17:29:34 (13 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/d2m_to_q2m_erai.pro
r77 r80 19 19 ; 20 20 ; q2m on OAFLUX grid is written in 21 ; :file:`${PROJECT_OD}/ q2m_erai_19890101_20091231_oafluxgrid.nc`21 ; :file:`${PROJECT_OD}/erai_q2m_19890101_20091231_oafluxgrid.nc` 22 22 ; if this file not already exists. 23 23 ; … … 34 34 ; file_t2m [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_t2m_19890101_20091231_oafluxgrid.nc"]; 35 35 ; file_msl [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_msl_19890101_20091231_oafluxgrid.nc"]; 36 ; file_q2m [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/ q2m_erai_19890101_20091231_oafluxgrid.nc"];36 ; file_q2m [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_q2m_19890101_20091231_oafluxgrid.nc"]; 37 37 ; 38 38 ; d2m_to_q2m_erai [shape=box, … … 48 48 ; ======== 49 49 ; 50 ; [Gill:AP:1982]_ 51 ; 52 ; [AOMIP]_ 53 ; 50 54 ; :ref:`project_profile.sh` 51 55 ; … … 74 78 ; ==== 75 79 ; 76 ; es0 undefined 80 ; pb on cratos idl7 even if output file is written:: 81 ; 82 ; % Program caused arithmetic error: Floating overflow 83 ; % Program caused arithmetic error: Floating illegal operand 84 ; 85 ; related to occurence of NaNf in ncdump output ? do no yet 86 ; 87 ; pk also see these error messages ... 88 ; 89 ; check for NaN value in P return by reading Netcdf msl file 90 ; solution is may be to apply *mskout to q2m like in interp* tools 91 ; not yet done to keep close as possible to pk processing 77 92 ; 78 93 ; coding rules … … 84 99 ; 85 100 ; $URL$ 101 ; 102 ; - fplod 20110811T114932Z aedon.locean-ipsl.upmc.fr (Darwin) 103 ; 104 ; * add es0 value 105 ; * add reference 106 ; * replace q2m_erai by erai_q2m in output filename 86 107 ; 87 108 ; - fplod 20110809T154249Z aedon.locean-ipsl.upmc.fr (Darwin) … … 186 207 ; 187 208 ; build output filename 188 filename_out = ' q2m_erai_19890101_20091231_oafluxgrid.nc'209 filename_out = 'erai_q2m_19890101_20091231_oafluxgrid.nc' 189 210 fullfilename_out = iodirout + filename_out 190 211 ; in order to avoid unexpected overwritten … … 205 226 help, t, td 206 227 207 ; ;since the t2m and d2m are already in K, no need for conversion208 228 ;since the t2m and d2m are already in K, no need for conversion 229 es0=6.11 209 230 e=es0*exp((25.e5/461.5)*((1/273.15)-(1/td))) 210 231 es=es0*exp((25.e5/461.5)*((1/273.15)-(1/t))) … … 221 242 P=read_ncdf("msl", d1, d2, file=fullfilename_msl,/nostr) 222 243 help, P 244 ; ++ for debug ftp error 245 ; ++print,P(0:1,0,0) 246 ; ++stop 223 247 q2m=rh_to_spechum(rh,t,P) 224 248 … … 239 263 globattr={source:'Surface specific humidity at 2m calculated from dew point temperature',timerange:cda0+' - '+cda1} 240 264 241 ncfields = 'q2m[longitude,latitude,time]=q2m:q2m_attr; ' $265 ncfields = i'q2m[longitude,latitude,time]=q2m:q2m_attr; ' $ 242 266 + 'longitude[]=xlon:lon_attr; ' $ 243 267 + 'latitude[]=ylat:lat_attr; ' $ -
trunk/src/interp_erai_msl_1989_2009.pro
r76 r80 73 73 ; ==== 74 74 ; 75 ; no input file available76 ;77 ; hard coded scale factor ? mslin=mslin/10078 ;79 75 ; msl_attr={units:'milibars' .. millibar at least, hPa will be probably 80 76 ; more SI … … 82 78 ; why 19880101,20100930 as dates 83 79 ; 80 ; first step time 14245.5 (days since 1950-01-01 00:00:00) : correct ? 81 ; 84 82 ; KNOWN ISSUES 85 83 ; ============ … … 94 92 ; 95 93 ; $URL$ 94 ; 95 ; - fplod 20110811T113646Z aedon.locean-ipsl.upmc.fr (Darwin) 96 ; 97 ; * check for units in original file before conversion 96 98 ; 97 99 ; - fplod 20110809T145539Z aedon.locean-ipsl.upmc.fr (Darwin) … … 217 219 print, 'lon grid ',min(lonout),max(lonout),lonout(1)-lonout(0) 218 220 mskout=read_ncdf("msk", file=fullfilename_msk,/nostr) 219 mslin=mslin/100 221 222 ; conversion to hPa 223 ncdf_getatt, fullfilename, 'msl', units=units 224 CASE units OF 225 'Pascal': BEGIN 226 mslin=mslin/100 227 END 228 ELSE: BEGIN 229 msg = 'eee : ' + units + ' unknown' 230 ras = report(msg) 231 STOP 232 END 233 ENDCASE 220 234 221 235 help, mslin,lonin,latin,mskin,lonout,latout,mskout -
trunk/src/lwr_correction_ncdf.pro
r72 r80 70 70 ; 19890101 is not provided in ERA-Intermim file str : a possible workaround is 71 71 ; to copy 19890102 72 ; dataset to 19890101 using nco before processing. see 73 ; ref:`compute_erai_daily_region_2d.sh` 72 ; dataset to 19890101 using nco before processing. 73 ; 74 ; here is the sequence used by pk wher erai_lwr_19890102_20091231_oafluxgrid.nc is the regridded (interpolated output) 75 ; 76 ; $ ncks -d time,0,0 erai_lwr_19890102_20091231_oafluxgrid.nc erai_lwr_step0.nc 77 ; 78 ; This will combine the two files :: 79 ; 80 ; $ ncrcat erai_lwr_step0.nc erai_lwr_19890102_20091231_oafluxgrid.nc erai_lwr_19890101_20091231_oafluxgrid.nc. 81 ; 82 ; must be put in a shell script or find IDL equivalent 74 83 ; 75 84 ; here I (fp) replace hard coded date 19890102 by 19890101. must check -
trunk/src/q2m_correction_ncdf.pro
r77 r80 21 21 ; 22 22 ; digraph q2m_correction_ncdf { 23 ; graph [24 ; rankdir="LR",25 ; ]26 23 ; 27 24 ; file_in [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_q2m_19890101_20091231_oafluxgrid.nc"]; … … 63 60 ; ==== 64 61 ; 65 ; can be tested because d2m_to_q2m.pro pb 62 ; work on cratos idl7 even if NaNf values in erai_q2m_19890101_20091231_oafluxgrid.nc written by 63 ; d2m_to_q2m.pro. 64 ; 65 ; No way ... NaNf also in this output !! 66 66 ; 67 67 ; coding rules … … 95 95 @cm_4data 96 96 @cm_project 97 ;98 97 ; 99 98 ; test if ${PROJECT_OD} defined … … 133 132 ; 134 133 ; check if this file exists 134 msg='iii : looking for ' + filename 135 ras = report(msg) 135 136 fullfilename = isafile(iodirout + filename, NEW=0, /MUST_EXIST) 136 137 IF fullfilename[0] EQ '' THEN BEGIN -
trunk/src/qsat.pro
r79 r80 1 ;-------------------------------------------------------- 2 function qsat, T,P 1 ;+ 3 2 ; 4 ; Air humidity at saturation (g/kg) 5 ; T: SST (degC) 6 ; P : surface pressure (mb) 7 ;-------------------------------------------------------- 3 ; ======== 4 ; qsat.pro 5 ; ======== 6 ; 7 ; .. function:: qsat(T,P) 8 ; 9 ; :param T: SST (degC) 10 ; :param P: surface pressure (mb) 11 ; 12 ; :returns: Air humidity at saturation (g/kg) 13 ; 14 ; EXAMPLES 15 ; ======== 16 ; 17 ; :: 18 ; 19 ; IDL> T=+todo+ 20 ; IDL> P=+todo+ 21 ; IDL> result=qsat(T,P) 22 ; 23 ; TODO 24 ; ==== 25 ; 26 ; coding rules 27 ; 28 ; complete example 29 ; 30 ; get rid of uppercase 31 ; 32 ; SEE ALSO 33 ; ======== 34 ; 35 ; :func:`rh_to_spechum` 36 ; 37 ; EVOLUTIONS 38 ; ========== 39 ; 40 ; $Id$ 41 ; 42 ; $URL$ 43 ; 44 ; - fplod 20110811T131113Z aedon.locean-ipsl.upmc.fr (Darwin) 45 ; 46 ; * add minimal header to pk release given today (!) 47 ; 48 ; - pbk 2008 49 ; 50 ; * creation 51 ; 52 ;- 53 function qsat, T, P 54 ; 8 55 x=T 9 56 es=6.112*exp(17.502*x/(x+241.))*(1.0007+3.46e-6*p) … … 13 60 14 61 end 15 ;--------------------------------------------------------16 -
trunk/src/rh_to_spechum.pro
r50 r80 1 1 ;+ 2 2 ; 3 ; ============= 4 ; rh_to_spechum 5 ; ============= 3 ; ================= 4 ; rh_to_spechum.pro 5 ; ================= 6 6 ; 7 7 ; .. function:: rh_to_spechum(rh,ta,P) … … 26 26 ; ==== 27 27 ; 28 ; hard coded directory - usage of ${PROJECT_ID}28 ; coding rules 29 29 ; 30 ; coding rules 30 ; complete example 31 ; 32 ; SEE ALSO 33 ; ======== 34 ; 35 ; called by :ref:`d2m_to_q2m_erai.pro` 36 ; 37 ; use :func:`qsat` 31 38 ; 32 39 ; EVOLUTIONS 33 40 ; ========== 41 ; 42 ; $Id$ 43 ; 44 ; $URL$ 45 ; 46 ; - fplod 20110811T130223Z aedon.locean-ipsl.upmc.fr (Darwin) 47 ; 48 ; * add reference to qsat function 34 49 ; 35 50 ; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin)
Note: See TracChangeset
for help on using the changeset viewer.