Changeset 66


Ignore:
Timestamp:
07/05/11 13:58:48 (11 years ago)
Author:
pinsard
Message:

no more hard coded path in iterp_erai*.pro

Location:
trunk/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/interp_erai_dewt_1989_2009.pro

    r50 r66  
    33; .. _interp_erai_dewt_1989_2009.pro: 
    44; 
    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`. 
    920; 
    1021;     .. graphviz:: 
     
    1425;           rankdir="LR", 
    1526;           ] 
    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"]; 
    1728;           mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; 
    1829; 
    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"]; 
    2031;           interp_erai_dewt_1989_2009 [shape=box, 
    2132;           fontname=Courier, 
     
    4253; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` 
    4354; 
     55; :ref:`d2m_to_q2m.pro` 
     56; 
    4457; EXAMPLES 
    4558; ======== 
     
    4760; :: 
    4861; 
     62;  IDL> .compile file_interp 
    4963;  IDL> interp_erai_dewt_1989_2009 
    5064; 
     
    5266; ==== 
    5367; 
    54 ; hard coded directory - usage of ${PROJECT_ID} 
     68; make it work : pb on loholt1:: 
     69; 
     70;   Variable is undefined: OUTMASK_IND. 
    5571; 
    5672; coding rules 
     
    6581; ========== 
    6682; 
     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; 
    6791; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) 
    6892; 
     
    83107;- 
    84108pro interp_erai_dewt_1989_2009 
    85 @common 
     109; 
     110@cm_4cal 
     111@cm_4data 
     112@cm_4mesh 
     113@cm_4data 
    86114@cm_project 
    87115; 
    88 ; check for input directory  
     116; check for input directory 
    89117; 
    90118; test if ${PROJECT_ID} defined 
     
    121149ENDIF 
    122150; 
    123 filein='/Volumes/PRAVEEN/ERAI_global/20c3m_erai_d2_TROP_1989_2009.nc' 
    124  
    125 initncdf, filein 
     151; build data filename 
     152filename='20c3m_erai_d2_TROP_1989_2009.nc' 
     153fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 
     154IF fullfilename[0] EQ '' THEN BEGIN 
     155   msg = 'eee : the file ' + fullfilename + ' was not found.' 
     156   ras = report(msg) 
     157   STOP 
     158ENDIF 
     159; 
     160; 
     161; test if ${PROJECT_OD} defined 
     162CASE 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 
     175iodirout = isadirectory(project_od_env) 
     176; 
     177; existence and protection 
     178IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 
     179    msg = 'eee : the directory' + iodirout  + ' was not found.' 
     180    ras = report(msg) 
     181    STOP 
     182ENDIF 
     183; 
     184; build output filename 
     185filename_out = 'erai_d2m_19890101_20091231_oafluxgrid.nc' 
     186fullfilename_out = iodirout + filename_out 
     187; in order to avoid unexpected overwritten 
     188IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 
     189   msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     190   ras = report(msg) 
     191   STOP 
     192ENDIF 
     193; 
     194initncdf, fullfilename 
    126195domdef 
    127196latin=reform(gphit(0,*)) & lonin=reform(glamt(*,0)) 
    128197print, 'lat grid ',min(latin),max(latin),latin(1)-latin(0) 
    129198print, 'lon grid ',min(lonin),max(lonin),lonin(1)-lonin(0) 
    130 d2min=read_ncdf("d2",19881201,20101231,file=filein,/nostr) 
     199d2min=read_ncdf("d2",19881201,20101231,file=fullfilename,/nostr) 
    131200 
    132201timein=time & jptin=jpt 
     
    166235lat=latout 
    167236lon=lonout 
    168 ncfile='!/Volumes/PRAVEEN/TropFlux/input_uncor/erai_d2m_19890101_20091231_oafluxgrid.nc' 
     237ncfile='!' + fullfilename_out 
    169238lon_attr={units:'degrees_east',long_name:'Longitude'} 
    170239lat_attr={units:'degrees_north',long_name:'Latitude'} 
  • trunk/src/interp_erai_lwr_1989_2009.pro

    r50 r66  
    33; .. _interp_erai_lwr_1989_2009.pro: 
    44; 
    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`. 
    820; 
    921;     .. graphviz:: 
     
    1527;           mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; 
    1628; 
    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"]; 
    2032; 
    2133;           interp_erai_lwr_1989_2009 [shape=box, 
     
    4355; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` 
    4456; 
     57; :ref:`lwr_correction_ncdf` 
     58; 
    4559; EXAMPLES 
    4660; ======== 
     
    4862; :: 
    4963; 
     64;  IDL> .compile file_interp 
    5065;  IDL> interp_erai_lwr_1989_2009 
    5166; 
     
    5368; ==== 
    5469; 
    55 ; hard coded directory - usage of ${PROJECT_ID} 
     70; make it work : pb on loholt1:: 
     71; 
     72;   Variable is undefined: OUTMASK_IND. 
    5673; 
    5774; coding rules 
     
    6683; ========== 
    6784; 
     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; 
    6893; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) 
    6994; 
     
    84109;- 
    85110pro interp_erai_lwr_1989_2009 
    86 @common 
     111; 
     112@cm_4cal 
     113@cm_4data 
     114@cm_4mesh 
     115@cm_4data 
     116@cm_project 
    87117; 
    88118; check for input directory 
     
    123153st=19890101 & en=20090801 
    124154 
    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 
     156filename='20c3m_erai_str_TROP_1989_2009.nc' 
     157; 
     158; check if this file exists 
     159fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 
     160IF fullfilename_msk[0] EQ '' THEN BEGIN 
     161   msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 
     162   ras = report(msg) 
     163   STOP 
     164ENDIF 
     165; 
     166; test if ${PROJECT_OD} defined 
     167CASE 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 
     180iodirout = isadirectory(project_od_env) 
     181; 
     182; existence and protection 
     183IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 
     184    msg = 'eee : the directory' + iodirout  + ' was not found.' 
     185    ras = report(msg) 
     186    STOP 
     187ENDIF 
     188; 
     189; build output filename 
     190filename_out = 'erai_lwr_19890101_20091231_oafluxgrid.nc' 
     191fullfilename_out = iodirout + filename_out 
     192; in order to avoid unexpected overwritten 
     193IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 
     194   msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     195   ras = report(msg) 
     196   STOP 
     197ENDIF 
     198; 
     199initncdf, fullfilename 
     200lwrin=read_ncdf("str",0,7668,/timestep,file=fullfilename,/nostr) 
    128201lwrin=-1*lwrin 
    129202help, lwrin 
    130203 
    131 initncdf, filein 
     204initncdf, fullfilename 
    132205domdef 
    133206latin=reform(gphit(0,*)) & lonin=reform(glamt(*,0)) 
     
    172245ylat=latout 
    173246xlon=lonout 
    174 ncfile='!/Volumes/PRAVEEN/TropFlux/input_uncor/erai_lwr_19890102_20091231_oafluxgrid.nc' 
    175  
     247ncfile='!' + fullfilename_out 
    176248lon_attr={units:'degrees_east',long_name:'Longitude'} 
    177249lat_attr={units:'degrees_north',long_name:'Latitude'} 
  • trunk/src/interp_erai_sst_1989_2009.pro

    r50 r66  
    33; .. _interp_erai_sst_1989_2009.pro: 
    44; 
    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; 
    821; 
    922;     .. graphviz:: 
     
    1326;           rankdir="LR", 
    1427;           ] 
    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"]; 
    1629; 
    1730;           mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; 
    1831; 
    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"]; 
    2033; 
    2134;           interp_erai_sst_1989_2009 [shape=box, 
     
    4255; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` 
    4356; 
     57; :ref:`sst_correction_ncdf` 
     58; 
    4459; EXAMPLES 
    4560; ======== 
     
    4762; :: 
    4863; 
     64;  IDL> .compile file_interp 
    4965;  IDL> interp_erai_sst_1989_2009 
    5066; 
     
    5268; ==== 
    5369; 
    54 ; hard coded directory - usage of ${PROJECT_ID} 
     70; make it work : pb on loholt1:: 
     71; 
     72;   Variable is undefined: OUTMASK_IND. 
    5573; 
    5674; coding rules 
     75; 
     76; use real output of :ref:`compute_erai_daily_region_2d.sh`. 
    5777; 
    5878; KNOWN ISSUES 
     
    6585; ========== 
    6686; 
     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; 
    6795; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) 
    6896; 
     
    78106; 
    79107; - pbk 2008 
    80 ; 
    81108; 
    82109;   * creation 
     
    84111;- 
    85112pro interp_erai_sst_1989_2009 
    86 @common 
     113; 
     114@cm_4cal 
     115@cm_4data 
     116@cm_4mesh 
     117@cm_4data 
    87118@cm_project 
    88119; 
     
    121152   STOP 
    122153ENDIF 
    123  
    124 filein='/Volumes/PRAVEEN/ERAI_global/20c3m_erai_sstk_TROP_1989_2009.nc' 
    125  
    126 initncdf, filein 
     154; 
     155; build data filename 
     156filename='20c3m_erai_sstk_TROP_1989_2009.nc' 
     157; 
     158; check if this file exists 
     159fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 
     160IF fullfilename_msk[0] EQ '' THEN BEGIN 
     161   msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 
     162   ras = report(msg) 
     163   STOP 
     164ENDIF 
     165; 
     166; test if ${PROJECT_OD} defined 
     167CASE 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 
     180iodirout = isadirectory(project_od_env) 
     181; 
     182; existence and protection 
     183IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 
     184    msg = 'eee : the directory' + iodirout  + ' was not found.' 
     185    ras = report(msg) 
     186    STOP 
     187ENDIF 
     188; 
     189; build output filename 
     190filename_out = 'erai_sst_19890101_20091231_oafluxgrid.nc' 
     191fullfilename_out = iodirout + filename_out 
     192; in order to avoid unexpected overwritten 
     193IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 
     194   msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     195   ras = report(msg) 
     196   STOP 
     197ENDIF 
     198; 
     199initncdf, fullfilename 
    127200domdef 
    128201latin=reform(gphit(0,*)) & lonin=reform(glamt(*,0)) 
    129202print, 'lat grid ',min(latin),max(latin),latin(1)-latin(0) 
    130203print, 'lon grid ',min(lonin),max(lonin),lonin(1)-lonin(0) 
    131 sstkin=read_ncdf("sstk",19871201,20100930,file=filein,/nostr) 
     204sstkin=read_ncdf("sstk",19871201,20100930,file=fullfilename,/nostr) 
    132205 
    133206timein=time & jptin=jpt 
     
    166239lat=latout 
    167240lon=lonout 
    168 ncfile='/Volumes/PRAVEEN/TropFlux/input_uncor/erai_sst_19890101_20091231_oafluxgrid.nc' 
     241ncfile='!' + fullfilename_out 
    169242lon_attr={units:'degrees_east',long_name:'Longitude'} 
    170243lat_attr={units:'degrees_north',long_name:'Latitude'} 
  • trunk/src/interp_erai_t2m_1989_2009.pro

    r50 r66  
    1818; 
    1919; This output file :file:`${PROJECT_OD}/erai_t2m_19890101_20091231_oafluxgrid.nc` must be processed after by :ref:`t2m_correction_ncdf.pro`. 
    20 ; 
    2120; 
    2221;     .. graphviz:: 
  • trunk/src/interp_erai_ws_1989_2009.pro

    r50 r66  
    33; .. _interp_erai_ws_1989_2009.pro: 
    44; 
    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`. 
    822; 
    923;     .. graphviz:: 
     
    1327;           rankdir="LR", 
    1428;           ] 
    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"]; 
    1731; 
    1832;           mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; 
    1933; 
    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"]; 
    2135; 
    2236;           interp_erai_ws_1989_2009 [shape=box, 
     
    4458; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` 
    4559; 
     60; :ref:`ws_correction_ncdf.pro` 
     61; 
    4662; EXAMPLES 
    4763; ======== 
     
    4965; :: 
    5066; 
     67;  IDL> .compile file_interp 
    5168;  IDL> interp_erai_ws_1989_2009 
    52 ; 
    5369; 
    5470; TODO 
    5571; ==== 
    5672; 
    57 ; hard coded directory - usage of ${PROJECT_ID} 
     73; make it work : pb on loholt1:: 
     74; 
     75;   Variable is undefined: OUTMASK_IND. 
    5876; 
    5977; coding rules 
     
    6886; ========== 
    6987; 
     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; 
    7096; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) 
    7197; 
     
    86112;- 
    87113pro interp_erai_ws_1989_2009 
    88 @common 
     114; 
     115@cm_4cal 
     116@cm_4data 
     117@cm_4mesh 
     118@cm_4data 
    89119@cm_project 
    90120; 
     
    123153   STOP 
    124154ENDIF 
    125  
     155; 
    126156st=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 
     159filename='20c3m_erai_u10_TROP_1989_2009.nc' 
     160; 
     161; check if this file exists 
     162fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 
     163IF fullfilename[0] EQ '' THEN BEGIN 
     164   msg = 'eee : the file ' + fullfilename + ' was not found.' 
     165   ras = report(msg) 
     166   STOP 
     167ENDIF 
     168; 
     169; test if ${PROJECT_OD} defined 
     170CASE 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 
     183iodirout = isadirectory(project_od_env) 
     184; 
     185; existence and protection 
     186IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 
     187    msg = 'eee : the directory' + iodirout  + ' was not found.' 
     188    ras = report(msg) 
     189    STOP 
     190ENDIF 
     191; 
     192; build output filename 
     193filename_out = 'erai_ws_19890101_20091231_oafluxgrid.nc' 
     194fullfilename_out = iodirout + filename_out 
     195; in order to avoid unexpected overwritten 
     196IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 
     197   msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     198   ras = report(msg) 
     199   STOP 
     200ENDIF 
     201; 
     202initncdf, fullfilename 
     203u10in=read_ncdf("u10",st, en,file=fullfilename,/nostr) 
     204 
     205; build v10 data filename 
     206filename='20c3m_erai_v10_TROP_1989_2009.nc' 
     207; 
     208; check if this file exists 
     209fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 
     210IF fullfilename[0] EQ '' THEN BEGIN 
     211   msg = 'eee : the file ' + fullfilename + ' was not found.' 
     212   ras = report(msg) 
     213   STOP 
     214ENDIF 
     215initncdf, fullfilename 
     216v10in=read_ncdf("v10",st, en,file=fullfilename,/nostr) 
     217 
     218initncdf, fullfilename 
    137219domdef 
    138220latin=reform(gphit(0,*)) & lonin=reform(glamt(*,0)) 
     
    181263ylat=latout 
    182264xlon=lonout 
    183 ncfile='!/Volumes/PRAVEEN/TropFlux/input_uncor/erai_ws_19890101_20091231_oafluxgrid.nc' 
    184  
     265ncfile='!' + fullfilename_out 
    185266lon_attr={units:'degrees_east',long_name:'Longitude'} 
    186267lat_attr={units:'degrees_north',long_name:'Latitude'} 
Note: See TracChangeset for help on using the changeset viewer.