- Timestamp:
- 07/05/11 13:58:48 (13 years ago)
- Location:
- trunk/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/interp_erai_dewt_1989_2009.pro
r50 r66 3 3 ; .. _interp_erai_dewt_1989_2009.pro: 4 4 ; 5 ; ============================== 6 ; interp_erai_dewt_1989_2009.pro 7 ; ============================== 8 ; 5 ; ============================================================================== 6 ; interp_erai_dewt_1989_2009.pro - Interpolation of d2 from ERA-I grid to OAFLUX 7 ; ============================================================================== 8 ; 9 ; Interpolation of d2 from ERA-I grid to OAFLUX grid 10 ; 11 ; :file:`${PROJECT_ID}/20c3m_erai_d2_TROP_1989_2009.nc` containing d2 from ERA-I have been produced 12 ; by :ref:`compute_erai_daily_region_2d.sh`. 13 ; 14 ; :file:`${PROJECT_ID}/mask_oaflux_30N30S.nc` containing OAFLUX grid have been produced by :ref:`oaflux_mask_30N30S.pro`. 15 ; 16 ; Interpolated d2 is written in 17 ; :file:`${PROJECT_OD}/erai_d2m_19890101_20091231_oafluxgrid.nc` if this file not already exists. 18 ; 19 ; This output file :file:`${PROJECT_OD}/erai_d2m_19890101_20091231_oafluxgrid.nc` must be processed after by :ref:`d2m_to_q2m.pro`. 9 20 ; 10 21 ; .. graphviz:: … … 14 25 ; rankdir="LR", 15 26 ; ] 16 ; file_in [shape=ellipse,fontname=Courier,label=" /Volumes/PRAVEEN/ERAI_global/20c3m_erai_d2_TROP_1989_2009.nc"];27 ; file_in [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/20c3m_erai_d2_TROP_1989_2009.nc"]; 17 28 ; mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; 18 29 ; 19 ; file_out [shape=ellipse,fontname=Courier,label=" /Volumes/PRAVEEN/TropFlux/input_uncor/erai_d2m_19890101_20091231_oafluxgrid.nc"];30 ; file_out [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_d2m_19890101_20091231_oafluxgrid.nc"]; 20 31 ; interp_erai_dewt_1989_2009 [shape=box, 21 32 ; fontname=Courier, … … 42 53 ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` 43 54 ; 55 ; :ref:`d2m_to_q2m.pro` 56 ; 44 57 ; EXAMPLES 45 58 ; ======== … … 47 60 ; :: 48 61 ; 62 ; IDL> .compile file_interp 49 63 ; IDL> interp_erai_dewt_1989_2009 50 64 ; … … 52 66 ; ==== 53 67 ; 54 ; hard coded directory - usage of ${PROJECT_ID} 68 ; make it work : pb on loholt1:: 69 ; 70 ; Variable is undefined: OUTMASK_IND. 55 71 ; 56 72 ; coding rules … … 65 81 ; ========== 66 82 ; 83 ; $Id$ 84 ; 85 ; $URL$ 86 ; 87 ; - pinsard 2011-07-05T07:33:36Z loholt1.ipsl.polytechnique.fr (Linux) 88 ; 89 ; * usage of $PROJECT_ID and $PROJECT_OD 90 ; 67 91 ; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) 68 92 ; … … 83 107 ;- 84 108 pro interp_erai_dewt_1989_2009 85 @common 109 ; 110 @cm_4cal 111 @cm_4data 112 @cm_4mesh 113 @cm_4data 86 114 @cm_project 87 115 ; 88 ; check for input directory 116 ; check for input directory 89 117 ; 90 118 ; test if ${PROJECT_ID} defined … … 121 149 ENDIF 122 150 ; 123 filein='/Volumes/PRAVEEN/ERAI_global/20c3m_erai_d2_TROP_1989_2009.nc' 124 125 initncdf, filein 151 ; build data filename 152 filename='20c3m_erai_d2_TROP_1989_2009.nc' 153 fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 154 IF fullfilename[0] EQ '' THEN BEGIN 155 msg = 'eee : the file ' + fullfilename + ' was not found.' 156 ras = report(msg) 157 STOP 158 ENDIF 159 ; 160 ; 161 ; test if ${PROJECT_OD} defined 162 CASE project_od_env OF 163 '' : BEGIN 164 msg = 'eee : ${PROJECT_OD} is not defined' 165 ras = report(msg) 166 STOP 167 END 168 ELSE: BEGIN 169 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 170 ras = report(msg) 171 END 172 ENDCASE 173 ; 174 ; check if output data will be possible 175 iodirout = isadirectory(project_od_env) 176 ; 177 ; existence and protection 178 IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 179 msg = 'eee : the directory' + iodirout + ' was not found.' 180 ras = report(msg) 181 STOP 182 ENDIF 183 ; 184 ; build output filename 185 filename_out = 'erai_d2m_19890101_20091231_oafluxgrid.nc' 186 fullfilename_out = iodirout + filename_out 187 ; in order to avoid unexpected overwritten 188 IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 189 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 190 ras = report(msg) 191 STOP 192 ENDIF 193 ; 194 initncdf, fullfilename 126 195 domdef 127 196 latin=reform(gphit(0,*)) & lonin=reform(glamt(*,0)) 128 197 print, 'lat grid ',min(latin),max(latin),latin(1)-latin(0) 129 198 print, 'lon grid ',min(lonin),max(lonin),lonin(1)-lonin(0) 130 d2min=read_ncdf("d2",19881201,20101231,file=f ilein,/nostr)199 d2min=read_ncdf("d2",19881201,20101231,file=fullfilename,/nostr) 131 200 132 201 timein=time & jptin=jpt … … 166 235 lat=latout 167 236 lon=lonout 168 ncfile='! /Volumes/PRAVEEN/TropFlux/input_uncor/erai_d2m_19890101_20091231_oafluxgrid.nc'237 ncfile='!' + fullfilename_out 169 238 lon_attr={units:'degrees_east',long_name:'Longitude'} 170 239 lat_attr={units:'degrees_north',long_name:'Latitude'} -
trunk/src/interp_erai_lwr_1989_2009.pro
r50 r66 3 3 ; .. _interp_erai_lwr_1989_2009.pro: 4 4 ; 5 ; ============================= 6 ; interp_erai_lwr_1989_2009.pro 7 ; ============================= 5 ; =============================================================================== 6 ; interp_erai_lwr_1989_2009.pro - Interpolation of str from ERA-I grid to OAFLUX 7 ; =============================================================================== 8 ; 9 ; Interpolation of str from ERA-I grid to OAFLUX grid 10 ; 11 ; :file:`${PROJECT_ID}/20c3m_erai_str_TROP_1989_2009.nc` containing str from ERA-I have been produced 12 ; by :ref:`compute_erai_daily_region_2d.sh`. 13 ; 14 ; :file:`${PROJECT_ID}/mask_oaflux_30N30S.nc` containing OAFLUX grid have been produced by :ref:`oaflux_mask_30N30S.pro`. 15 ; 16 ; Interpolated str is written in 17 ; :file:`${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc` if this file not already exists. 18 ; 19 ; This output file :file:`${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc` must be processed after by :ref:`lwr_correction_ncdf.pro`. 8 20 ; 9 21 ; .. graphviz:: … … 15 27 ; mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; 16 28 ; 17 ; file_in [shape=ellipse,fontname=Courier,label=" /Volumes/PRAVEEN/ERAI_global/20c3m_erai_str_TROP_1989_2009.nc"];18 ; 19 ; ncfile [shape=ellipse,fontname=Courier,label=" /Volumes/PRAVEEN/TropFlux/input_uncor/erai_lwr_19890102_20091231_oafluxgrid.nc"];29 ; file_in [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/20c3m_erai_str_TROP_1989_2009.nc"]; 30 ; 31 ; ncfile [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc"]; 20 32 ; 21 33 ; interp_erai_lwr_1989_2009 [shape=box, … … 43 55 ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` 44 56 ; 57 ; :ref:`lwr_correction_ncdf` 58 ; 45 59 ; EXAMPLES 46 60 ; ======== … … 48 62 ; :: 49 63 ; 64 ; IDL> .compile file_interp 50 65 ; IDL> interp_erai_lwr_1989_2009 51 66 ; … … 53 68 ; ==== 54 69 ; 55 ; hard coded directory - usage of ${PROJECT_ID} 70 ; make it work : pb on loholt1:: 71 ; 72 ; Variable is undefined: OUTMASK_IND. 56 73 ; 57 74 ; coding rules … … 66 83 ; ========== 67 84 ; 85 ; $Id$ 86 ; 87 ; $URL$ 88 ; 89 ; - pinsard 2011-07-05T07:33:36Z loholt1.ipsl.polytechnique.fr (Linux) 90 ; 91 ; * usage of $PROJECT_ID and $PROJECT_OD 92 ; 68 93 ; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) 69 94 ; … … 84 109 ;- 85 110 pro interp_erai_lwr_1989_2009 86 @common 111 ; 112 @cm_4cal 113 @cm_4data 114 @cm_4mesh 115 @cm_4data 116 @cm_project 87 117 ; 88 118 ; check for input directory … … 123 153 st=19890101 & en=20090801 124 154 125 filein='/Volumes/PRAVEEN/ERAI_global/20c3m_erai_str_TROP_1989_2009.nc' 126 initncdf, filein 127 lwrin=read_ncdf("str",0,7668,/timestep,file=filein,/nostr) 155 ; build data filename 156 filename='20c3m_erai_str_TROP_1989_2009.nc' 157 ; 158 ; check if this file exists 159 fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 160 IF fullfilename_msk[0] EQ '' THEN BEGIN 161 msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 162 ras = report(msg) 163 STOP 164 ENDIF 165 ; 166 ; test if ${PROJECT_OD} defined 167 CASE project_od_env OF 168 '' : BEGIN 169 msg = 'eee : ${PROJECT_OD} is not defined' 170 ras = report(msg) 171 STOP 172 END 173 ELSE: BEGIN 174 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 175 ras = report(msg) 176 END 177 ENDCASE 178 ; 179 ; check if output data will be possible 180 iodirout = isadirectory(project_od_env) 181 ; 182 ; existence and protection 183 IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 184 msg = 'eee : the directory' + iodirout + ' was not found.' 185 ras = report(msg) 186 STOP 187 ENDIF 188 ; 189 ; build output filename 190 filename_out = 'erai_lwr_19890101_20091231_oafluxgrid.nc' 191 fullfilename_out = iodirout + filename_out 192 ; in order to avoid unexpected overwritten 193 IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 194 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 195 ras = report(msg) 196 STOP 197 ENDIF 198 ; 199 initncdf, fullfilename 200 lwrin=read_ncdf("str",0,7668,/timestep,file=fullfilename,/nostr) 128 201 lwrin=-1*lwrin 129 202 help, lwrin 130 203 131 initncdf, f ilein204 initncdf, fullfilename 132 205 domdef 133 206 latin=reform(gphit(0,*)) & lonin=reform(glamt(*,0)) … … 172 245 ylat=latout 173 246 xlon=lonout 174 ncfile='!/Volumes/PRAVEEN/TropFlux/input_uncor/erai_lwr_19890102_20091231_oafluxgrid.nc' 175 247 ncfile='!' + fullfilename_out 176 248 lon_attr={units:'degrees_east',long_name:'Longitude'} 177 249 lat_attr={units:'degrees_north',long_name:'Latitude'} -
trunk/src/interp_erai_sst_1989_2009.pro
r50 r66 3 3 ; .. _interp_erai_sst_1989_2009.pro: 4 4 ; 5 ; ============================= 6 ; interp_erai_sst_1989_2009.pro 7 ; ============================= 5 ; ============================================================================== 6 ; interp_erai_sst_1989_2009.pro - Interpolation of sst from ERA-I grid to OAFLUX 7 ; ============================================================================== 8 ; 9 ; Interpolation of sst from ERA-I grid to OAFLUX grid 10 ; 11 ; :file:`${PROJECT_ID}/20c3m_erai_sstk_TROP_1989_2009.nc` containing sst from ERA-I have been produced 12 ; by :ref:`compute_erai_daily_region_2d.sh`. 13 ; 14 ; :file:`${PROJECT_ID}/mask_oaflux_30N30S.nc` containing OAFLUX grid have been p roduced by :ref:`oaflux_mask_30N30S.pro`. 15 ; 16 ; Interpolated sst is written in 17 ; :file:`${PROJECT_OD}/erai_sst_19890101_20091231_oafluxgrid.nc` if this file not already exists. 18 ; 19 ; This output file :file:`${PROJECT_OD}/erai_sst_19890101_20091231_oafluxgrid.nc` must be processed after by :ref:`sst_correction_ncdf.pro`. 20 ; 8 21 ; 9 22 ; .. graphviz:: … … 13 26 ; rankdir="LR", 14 27 ; ] 15 ; file_in [shape=ellipse,fontname=Courier,label=" /Volumes/PRAVEEN/ERAI_global/20c3m_erai_sstk_TROP_1989_2009.nc"];28 ; file_in [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/20c3m_erai_sstk_TROP_1989_2009.nc"]; 16 29 ; 17 30 ; mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; 18 31 ; 19 ; ncfile [shape=ellipse,fontname=Courier,label=" /Volumes/PRAVEEN/TropFlux/input_uncor/erai_sst_19890101_20091231_oafluxgrid.nc"];32 ; ncfile [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_sst_19890101_20091231_oafluxgrid.nc"]; 20 33 ; 21 34 ; interp_erai_sst_1989_2009 [shape=box, … … 42 55 ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` 43 56 ; 57 ; :ref:`sst_correction_ncdf` 58 ; 44 59 ; EXAMPLES 45 60 ; ======== … … 47 62 ; :: 48 63 ; 64 ; IDL> .compile file_interp 49 65 ; IDL> interp_erai_sst_1989_2009 50 66 ; … … 52 68 ; ==== 53 69 ; 54 ; hard coded directory - usage of ${PROJECT_ID} 70 ; make it work : pb on loholt1:: 71 ; 72 ; Variable is undefined: OUTMASK_IND. 55 73 ; 56 74 ; coding rules 75 ; 76 ; use real output of :ref:`compute_erai_daily_region_2d.sh`. 57 77 ; 58 78 ; KNOWN ISSUES … … 65 85 ; ========== 66 86 ; 87 ; $Id$ 88 ; 89 ; $URL$ 90 ; 91 ; - pinsard 2011-07-04T15:45:35Z loholt1.ipsl.polytechnique.fr (Linux) 92 ; 93 ; * usage of ${PROJECT_ID} and $PROJECT_OD 94 ; 67 95 ; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) 68 96 ; … … 78 106 ; 79 107 ; - pbk 2008 80 ;81 108 ; 82 109 ; * creation … … 84 111 ;- 85 112 pro interp_erai_sst_1989_2009 86 @common 113 ; 114 @cm_4cal 115 @cm_4data 116 @cm_4mesh 117 @cm_4data 87 118 @cm_project 88 119 ; … … 121 152 STOP 122 153 ENDIF 123 124 filein='/Volumes/PRAVEEN/ERAI_global/20c3m_erai_sstk_TROP_1989_2009.nc' 125 126 initncdf, filein 154 ; 155 ; build data filename 156 filename='20c3m_erai_sstk_TROP_1989_2009.nc' 157 ; 158 ; check if this file exists 159 fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 160 IF fullfilename_msk[0] EQ '' THEN BEGIN 161 msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 162 ras = report(msg) 163 STOP 164 ENDIF 165 ; 166 ; test if ${PROJECT_OD} defined 167 CASE project_od_env OF 168 '' : BEGIN 169 msg = 'eee : ${PROJECT_OD} is not defined' 170 ras = report(msg) 171 STOP 172 END 173 ELSE: BEGIN 174 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 175 ras = report(msg) 176 END 177 ENDCASE 178 ; 179 ; check if output data will be possible 180 iodirout = isadirectory(project_od_env) 181 ; 182 ; existence and protection 183 IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 184 msg = 'eee : the directory' + iodirout + ' was not found.' 185 ras = report(msg) 186 STOP 187 ENDIF 188 ; 189 ; build output filename 190 filename_out = 'erai_sst_19890101_20091231_oafluxgrid.nc' 191 fullfilename_out = iodirout + filename_out 192 ; in order to avoid unexpected overwritten 193 IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 194 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 195 ras = report(msg) 196 STOP 197 ENDIF 198 ; 199 initncdf, fullfilename 127 200 domdef 128 201 latin=reform(gphit(0,*)) & lonin=reform(glamt(*,0)) 129 202 print, 'lat grid ',min(latin),max(latin),latin(1)-latin(0) 130 203 print, 'lon grid ',min(lonin),max(lonin),lonin(1)-lonin(0) 131 sstkin=read_ncdf("sstk",19871201,20100930,file=f ilein,/nostr)204 sstkin=read_ncdf("sstk",19871201,20100930,file=fullfilename,/nostr) 132 205 133 206 timein=time & jptin=jpt … … 166 239 lat=latout 167 240 lon=lonout 168 ncfile=' /Volumes/PRAVEEN/TropFlux/input_uncor/erai_sst_19890101_20091231_oafluxgrid.nc'241 ncfile='!' + fullfilename_out 169 242 lon_attr={units:'degrees_east',long_name:'Longitude'} 170 243 lat_attr={units:'degrees_north',long_name:'Latitude'} -
trunk/src/interp_erai_t2m_1989_2009.pro
r50 r66 18 18 ; 19 19 ; This output file :file:`${PROJECT_OD}/erai_t2m_19890101_20091231_oafluxgrid.nc` must be processed after by :ref:`t2m_correction_ncdf.pro`. 20 ;21 20 ; 22 21 ; .. graphviz:: -
trunk/src/interp_erai_ws_1989_2009.pro
r50 r66 3 3 ; .. _interp_erai_ws_1989_2009.pro: 4 4 ; 5 ; ============================ 6 ; interp_erai_ws_1989_2009.pro 7 ; ============================ 5 ; ========================================================================================== 6 ; interp_erai_ws_1989_2009.pro - Interpolation of u10 and v10 from ERA-I grid to OAFLUX grid 7 ; ========================================================================================== 8 ; 9 ; Interpolation of u10 and v10 from ERA-I grid to OAFLUX grid 10 ; 11 ; :file:`${PROJECT_ID}/20c3m_erai_u10_TROP_1989_2009.nc` containing u10 from ERA-I have been produced 12 ; by :ref:`compute_erai_daily_region_2d.sh`. 13 ; 14 ; :file:`${PROJECT_ID}/20c3m_erai_v10_TROP_1989_2009.nc` containing u10 from ERA-I have been produced 15 ; 16 ; :file:`${PROJECT_ID}/mask_oaflux_30N30S.nc` containing OAFLUX grid have been produced by :ref:`oaflux_mask_30N30S.pro`. 17 ; 18 ; Interpolated u10 and v10 is written in 19 ; :file:`${PROJECT_OD}/erai_ws_19890101_20091231_oafluxgrid.nc` if this file not already exists. 20 ; 21 ; This output file :file:`${PROJECT_OD}/erai_ws_19890101_20091231_oafluxgrid.nc` must be processed after by :ref:`ws_correction_ncdf.pro`. 8 22 ; 9 23 ; .. graphviz:: … … 13 27 ; rankdir="LR", 14 28 ; ] 15 ; file_u10 [shape=ellipse,fontname=Courier,label=" /Volumes/PRAVEEN/ERAI_global/20c3m_erai_u10_TROP_1989_2009.nc"];16 ; file_v10 [shape=ellipse,fontname=Courier,label=" /Volumes/PRAVEEN/ERAI_global/20c3m_erai_v10_TROP_1989_2009.nc"];29 ; file_u10 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/20c3m_erai_u10_TROP_1989_2009.nc"]; 30 ; file_v10 [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/20c3m_erai_v10_TROP_1989_2009.nc"]; 17 31 ; 18 32 ; mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; 19 33 ; 20 ; ncfile [shape=ellipse,fontname=Courier,label=" /Volumes/PRAVEEN/TropFlux/input_uncor/erai_ws_19890101_20091231_oafluxgrid.nc"];34 ; ncfile [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_ws_19890101_20091231_oafluxgrid.nc"]; 21 35 ; 22 36 ; interp_erai_ws_1989_2009 [shape=box, … … 44 58 ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` 45 59 ; 60 ; :ref:`ws_correction_ncdf.pro` 61 ; 46 62 ; EXAMPLES 47 63 ; ======== … … 49 65 ; :: 50 66 ; 67 ; IDL> .compile file_interp 51 68 ; IDL> interp_erai_ws_1989_2009 52 ;53 69 ; 54 70 ; TODO 55 71 ; ==== 56 72 ; 57 ; hard coded directory - usage of ${PROJECT_ID} 73 ; make it work : pb on loholt1:: 74 ; 75 ; Variable is undefined: OUTMASK_IND. 58 76 ; 59 77 ; coding rules … … 68 86 ; ========== 69 87 ; 88 ; $Id$ 89 ; 90 ; $URL$ 91 ; 92 ; - pinsard 2011-07-05T07:33:36Z loholt1.ipsl.polytechnique.fr (Linux) 93 ; 94 ; * usage of $PROJECT_ID and $PROJECT_OD 95 ; 70 96 ; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) 71 97 ; … … 86 112 ;- 87 113 pro interp_erai_ws_1989_2009 88 @common 114 ; 115 @cm_4cal 116 @cm_4data 117 @cm_4mesh 118 @cm_4data 89 119 @cm_project 90 120 ; … … 123 153 STOP 124 154 ENDIF 125 155 ; 126 156 st=19880101 & en=20100930 127 128 filein='/Volumes/PRAVEEN/ERAI_global/20c3m_erai_u10_TROP_1989_2009.nc' 129 initncdf, filein 130 u10in=read_ncdf("u10",st, en,file=filein,/nostr) 131 132 filein='/Volumes/PRAVEEN/ERAI_global/20c3m_erai_v10_TROP_1989_2009.nc' 133 initncdf, filein 134 v10in=read_ncdf("v10",st, en,file=filein,/nostr) 135 136 initncdf, filein 157 ; 158 ; build u10 data filename 159 filename='20c3m_erai_u10_TROP_1989_2009.nc' 160 ; 161 ; check if this file exists 162 fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 163 IF fullfilename[0] EQ '' THEN BEGIN 164 msg = 'eee : the file ' + fullfilename + ' was not found.' 165 ras = report(msg) 166 STOP 167 ENDIF 168 ; 169 ; test if ${PROJECT_OD} defined 170 CASE project_od_env OF 171 '' : BEGIN 172 msg = 'eee : ${PROJECT_OD} is not defined' 173 ras = report(msg) 174 STOP 175 END 176 ELSE: BEGIN 177 msg = 'iii : ${PROJECT_OD} is ' + project_od_env 178 ras = report(msg) 179 END 180 ENDCASE 181 ; 182 ; check if output data will be possible 183 iodirout = isadirectory(project_od_env) 184 ; 185 ; existence and protection 186 IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 187 msg = 'eee : the directory' + iodirout + ' was not found.' 188 ras = report(msg) 189 STOP 190 ENDIF 191 ; 192 ; build output filename 193 filename_out = 'erai_ws_19890101_20091231_oafluxgrid.nc' 194 fullfilename_out = iodirout + filename_out 195 ; in order to avoid unexpected overwritten 196 IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 197 msg = 'eee : the file ' + fullfilename_out + ' already exists.' 198 ras = report(msg) 199 STOP 200 ENDIF 201 ; 202 initncdf, fullfilename 203 u10in=read_ncdf("u10",st, en,file=fullfilename,/nostr) 204 205 ; build v10 data filename 206 filename='20c3m_erai_v10_TROP_1989_2009.nc' 207 ; 208 ; check if this file exists 209 fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 210 IF fullfilename[0] EQ '' THEN BEGIN 211 msg = 'eee : the file ' + fullfilename + ' was not found.' 212 ras = report(msg) 213 STOP 214 ENDIF 215 initncdf, fullfilename 216 v10in=read_ncdf("v10",st, en,file=fullfilename,/nostr) 217 218 initncdf, fullfilename 137 219 domdef 138 220 latin=reform(gphit(0,*)) & lonin=reform(glamt(*,0)) … … 181 263 ylat=latout 182 264 xlon=lonout 183 ncfile='!/Volumes/PRAVEEN/TropFlux/input_uncor/erai_ws_19890101_20091231_oafluxgrid.nc' 184 265 ncfile='!' + fullfilename_out 185 266 lon_attr={units:'degrees_east',long_name:'Longitude'} 186 267 lat_attr={units:'degrees_north',long_name:'Latitude'}
Note: See TracChangeset
for help on using the changeset viewer.