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_olr_30n30s_1989_2009.pro

    r12 r19  
    1515;           file_in [shape=ellipse,fontname=Courier,label="/Users/pkb/data/heat_budget/NOAA_OLR/new/olr.day.mean_new.nc"]; 
    1616; 
    17 ;           mask [shape=ellipse,fontname=Courier,label="/Volumes/PRAVEEN/work/flux_reconstruction/gridded_data/mask_oaflux_30N30S.nc"]; 
     17;           mask [shape=ellipse,fontname=Courier,label="${TROPFLUX_ID}/mask_oaflux_30N30S.nc"]; 
    1818; 
    1919;           ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/heat_budget/NOAA_OLR/newolr_oafluxgrid_30n30s_19890101_20091231.nc"]; 
     
    3232; ======== 
    3333; 
     34; :ref:`tropflux_profile.sh` 
     35; 
    3436; EXAMPLES 
    3537; ======== 
     
    4648; coding rules 
    4749; 
     50; KNOWN ISSUES 
     51; ============ 
     52; 
     53; test of existence of fullfilename_msk not very efficient because 
     54; MUST_EXIST keyword of :func:`isafile <saxo:isafile>` not yet implemented 
     55; 
    4856; EVOLUTIONS 
    4957; ========== 
     58; 
     59; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) 
     60; 
     61;   * remove hard coded directory for mask_oaflux_30N30S.nc 
    5062; 
    5163; - fplod 20101215T113118Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    6476pro interp_olr_30n30s_1989_2009 
    6577@common 
     78; 
     79; check for input directory  
     80; 
     81; test if ${TROPFLUX_ID} defined 
     82tropflux_id_env=GETENV('TROPFLUX_ID') 
     83CASE tropflux_id_env OF 
     84    ''  :  BEGIN 
     85     msg = 'eee : ${TROPFLUX_ID} is not defined' 
     86     ras = report(msg) 
     87     STOP 
     88           END 
     89 ELSE: BEGIN 
     90     msg = 'iii : ${TROPFLUX_ID} is ' + tropflux_id_env 
     91     ras = report(msg) 
     92       END 
     93ENDCASE 
     94; 
     95iodirin = isadirectory(tropflux_id_env) 
     96; 
     97; existence and protection of ${TROPFLUX_ID} 
     98IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
     99   msg = 'eee : the directory' + iodirin  + ' is not accessible.' 
     100   ras = report(msg) 
     101   STOP 
     102ENDIF 
     103; 
     104; build mask filename 
     105filename_msk='mask_oaflux_30N30S.nc' 
     106; 
     107; check if this file exists 
     108fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) 
     109IF fullfilename_msk[0] EQ '' THEN BEGIN 
     110   msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 
     111   ras = report(msg) 
     112   STOP 
     113ENDIF 
    66114 
    67115filein='/Users/pkb/data/heat_budget/NOAA_OLR/new/olr.day.mean_new.nc' 
    68 gridout='/Volumes/PRAVEEN/work/flux_reconstruction/gridded_data/mask_oaflux_30N30S.nc' 
    69116 
    70117initncdf, filein 
     
    79126timein=time & jptin=jpt 
    80127 
    81 initncdf, gridout 
     128initncdf, fullfilename_msk 
    82129domdef 
    83130latout=reform(gphit(0,*)) & lonout=reform(glamt(*,0)) 
    84131print, 'lat grid ',min(latout),max(latout),latout(1)-latout(0) 
    85132print, 'lon grid ',min(lonout),max(lonout),lonout(1)-lonout(0) 
    86 mskout=read_ncdf("msk", file=gridout,/nostr) 
     133mskout=read_ncdf("msk", file=fullfilename_msk,/nostr) 
    87134 
    88135help, olrin,lonin,latin,mskin,lonout,latout,mskout 
Note: See TracChangeset for help on using the changeset viewer.