Changeset 107 for trunk/src/flux_evaluation_tpr_timeseries.pro
- Timestamp:
- 11/30/11 15:53:12 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/flux_evaluation_tpr_timeseries.pro
r106 r107 1 ;------------------------------------------------------------ 1 ;+ 2 ; 3 ; .. _flux_evaluation_tpr_timeseries.pro: 4 ; 5 ; ================================== 6 ; flux_evaluation_tpr_timeseries.pro 7 ; ================================== 8 ; 9 ; DESCRIPTION 10 ; =========== 11 ; 12 ; SEE ALSO 13 ; ======== 14 ; 15 ; :ref:`project_profile.sh` 16 ; :ref:`project_init.pro` 17 ; :ref:`cm_project.pro` 18 ; 19 ; TODO 20 ; ==== 21 ; 22 ; make it work : missing READ_TPR_NETFLUX 23 ; 24 ; EXAMPLES 25 ; ======== 26 ; 27 ; :: 28 ; 29 ; IDL> date1 = 20000101L 30 ; IDL> date2 = 20091231L 31 ; IDL> flux_evaluation_tpr_timeseries, date1, date2 32 ; 33 ; EVOLUTIONS 34 ; ========== 35 ; 36 ; $Id$ 37 ; 38 ; $URL$ 39 ; 40 ; - fplod 20111130T141341Z cratos (Linux) 41 ; 42 ; * try to make it work on my account on cratos 43 ; * remove x_site_location and x_site_location because already exist 44 ; 45 ;- 2 46 pro flux_evaluation_tpr_timeseries, $ 3 47 ; var, $ ;; flux variable (swr, lwr, lhf, shf) to calculate the statistics … … 6 50 7 51 @common 8 ;------------------------------------------------------------ 52 @cm_project 9 53 reinitplt, /z,/invert 10 54 key_portrait = 0 11 openps, FILENAME = 'idl.ps'55 openps, FILENAME = project_od_env+'flux_evaluation_tpr_timeseries.ps' 12 56 ;------------------------------------------------------------ 13 57 ;; part to change … … 45 89 close,/all 46 90 47 fi= '/Users/pkb/work/MY_SAXO/TropFlux_update/flux_stat.txt'91 fi=project_id_env + 'flux_stat.txt' 48 92 openw,1,fi 49 93 … … 52 96 ;; First, this program reads the full TropFlux data and later extract it at specific TPR locations 53 97 54 file ="/Volumes/PAYASAM/TropFlux/TropFlux/shf_tropflux_1d_1989_2010.nc"98 file = project_id_env + "shf_tropflux_1d_1989_2010.nc" 55 99 initncdf, file 56 100 var=-1*read_ncdf("shf", date1, date2, file=file,/nostr) … … 74 118 if (y ge 0. and y le 30.) then y=y+360. 75 119 dx=0.5 & dy=0.5 & box=[y-dy, y+dy, x-dx, x+dx] 76 120 77 121 read_tpr_netflux, csite,date1,date2,nsmooth, $ 78 122 sw,lw,sh,lh … … 97 141 cstat=string(cor, bias, std, rmsd, format='(f4.2,3x,f7.2,3x,f4.2,3x,f5.2)') 98 142 print, cstat 99 143 100 144 ;; PLOTTING THE TIME-SERIES 101 145 array=[tpr, var_tpr] & mi=min(array,/nan) & ma=max(array,/nan) & int=(ma-mi)/3. … … 111 155 112 156 close,/all 113 ;----------------------------------------------------------114 157 closeps 115 158 116 fig='flux_evaluation_tpr_timeseries.ps'117 spawn, 'mv '+psdir+'idl.ps '+updatedir+fig118 spawn, 'gv '+updatedir+fig119 return120 159 end 121 ;--------------------------------------------------------------------------122 function x_site_location, site123 n1=strpos(site, 's')124 if (n1 gt -1) then begin125 ns=-1.126 x=strmid(site, 0, n1)127 x=float(x)*ns128 endif else begin129 n1=strpos(site, 'n')130 x=strmid(site, 0, n1)131 ny=1.132 x=float(x)*ny133 endelse134 return, float(x)135 end136 ;--------------------------------------------------------------------------137 function y_site_location, site138 n1=strpos(site, 'e')139 if (n1 gt -1) then begin140 n=strpos(site, 's')141 if (n gt -1) then begin142 y=strmid(site, n+1, n1-n-1)143 endif else begin144 n=strpos(site, 'n')145 y=strmid(site, n+1, n1-n-1)146 endelse147 148 endif else begin149 n1=strpos(site, 'w')150 n=strpos(site, 's')151 if (n gt -1) then begin152 y=strmid(site, n+1, n1-n-1)153 y=180+(180-float(y))154 endif else begin155 n=strpos(site, 'n')156 y=strmid(site, n+1, n1-n-1)157 y=180+(180-float(y))158 endelse159 endelse160 return,float(y)161 end162 163 ;--------------------------------------------------------------------------164
Note: See TracChangeset
for help on using the changeset viewer.