Ignore:
Timestamp:
12/17/10 16:18:08 (14 years ago)
Author:
pinsard
Message:

remove hard coded directory for mask_oaflux_30N30S.nc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/interp_erai_ws_1989_2009.pro

    r12 r19  
    1616;           file_v10 [shape=ellipse,fontname=Courier,label="/Volumes/PRAVEEN/ERAI_global/20c3m_erai_v10_TROP_1989_2009.nc"]; 
    1717; 
    18 ;           mask [shape=ellipse,fontname=Courier,label="/Volumes/PRAVEEN/work/flux_reconstruction/gridded_data/mask_oaflux_30N30S.nc"]; 
     18;           mask [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/mask_oaflux_30N30S.nc"]; 
    1919; 
    2020;           ncfile [shape=ellipse,fontname=Courier,label="/Volumes/PRAVEEN/TropFlux/input_uncor/erai_ws_19890101_20091231_oafluxgrid.nc"]; 
     
    3333; ======== 
    3434; 
     35; :ref:`tropflux_profile.sh` 
     36; 
    3537; EXAMPLES 
    3638; ======== 
     
    4850; coding rules 
    4951; 
     52; KNOWN ISSUES 
     53; ============ 
     54; 
     55; test of existence of fullfilename_msk not very efficient because 
     56; MUST_EXIST keyword of :func:`isafile <saxo:isafile>` not yet implemented 
     57; 
    5058; EVOLUTIONS 
    5159; ========== 
     60; 
     61; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) 
     62; 
     63;   * remove hard coded directory for mask_oaflux_30N30S.nc 
    5264; 
    5365; - fplod 20101215T112657Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    6678pro interp_erai_ws_1989_2009 
    6779@common 
     80; 
     81; check for input directory  
     82; 
     83; test if ${TROPFLUX_ID} defined 
     84tropflux_id_env=GETENV('TROPFLUX_ID') 
     85CASE tropflux_id_env OF 
     86    ''  :  BEGIN 
     87     msg = 'eee : ${TROPFLUX_ID} is not defined' 
     88     ras = report(msg) 
     89     STOP 
     90           END 
     91 ELSE: BEGIN 
     92     msg = 'iii : ${TROPFLUX_ID} is ' + tropflux_id_env 
     93     ras = report(msg) 
     94       END 
     95ENDCASE 
     96; 
     97iodirin = isadirectory(tropflux_id_env) 
     98; 
     99; existence and protection of ${TROPFLUX_ID} 
     100IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
     101   msg = 'eee : the directory' + iodirin  + ' is not accessible.' 
     102   ras = report(msg) 
     103   STOP 
     104ENDIF 
     105; 
     106; build mask filename 
     107filename_msk='mask_oaflux_30N30S.nc' 
     108; 
     109; check if this file exists 
     110fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) 
     111IF fullfilename_msk[0] EQ '' THEN BEGIN 
     112   msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 
     113   ras = report(msg) 
     114   STOP 
     115ENDIF 
    68116 
    69117st=19880101 & en=20100930 
     
    77125v10in=read_ncdf("v10",st, en,file=filein,/nostr) 
    78126 
    79 gridout='/Volumes/PRAVEEN/work/flux_reconstruction/gridded_data/mask_oaflux_30N30S.nc' 
    80  
    81127initncdf, filein 
    82128domdef 
     
    89135mskin=glamt*0.+1. 
    90136 
    91 initncdf, gridout 
     137initncdf, fullfilename_msk 
    92138domdef 
    93139latout=reform(gphit(0,*)) & lonout=reform(glamt(*,0)) 
    94140print, 'lat grid ',min(latout),max(latout),latout(1)-latout(0) 
    95141print, 'lon grid ',min(lonout),max(lonout),lonout(1)-lonout(0) 
    96 mskout=read_ncdf("msk", file=gridout,/nostr) 
     142mskout=read_ncdf("msk", file=fullfilename_msk,/nostr) 
    97143 
    98144help, u10in, v10in,lonin,latin,mskin,lonout,latout,mskout 
     
    121167xlon=reform(glamt(*,0) ) & ylat=reform(gphit(0,*)) 
    122168 
    123 initncdf, gridout 
     169initncdf, fullfilename_msk 
    124170valmask=1.e20 
    125171 
Note: See TracChangeset for help on using the changeset viewer.