Changeset 66 for trunk/src/interp_erai_sst_1989_2009.pro
- Timestamp:
- 07/05/11 13:58:48 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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'}
Note: See TracChangeset
for help on using the changeset viewer.