Changeset 74 for trunk


Ignore:
Timestamp:
08/09/11 16:12:48 (13 years ago)
Author:
pinsard
Message:

start to work on the final step

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/TropFlux_19890101_20091231.pro

    r50 r74  
    1414; gustiness values. 
    1515; 
    16 ; 
     16; :file:`${PROJECT_ID}/mask_oaflux_30N30S.nc` containing OAFLUX grid have been produced by :ref:`oaflux_mask_30N30S.pro`. 
     17; 
     18; :file:`${PROJECT_OD}/TropFlux_sst_19890101_20091231.nc` containing sst corrected on OAFLUX grid have been produced by :ref:`sst_correction_ncdf.pro`. 
     19; 
     20; :file:`${PROJECT_OD}/TropFlux_ws_19890101_20091231.nc` containing ws corrected on OAFLUX grid have been produced by :ref:`ws_correction_ncdf.pro`. 
     21; 
     22; :file:`${PROJECT_OD}/TropFlux_gustiness_19890101_20091231.nc` containing ++ 
     23; have been produced by :ref:` cronin_gustiness_ncdf.pro`. 
     24; 
     25; :file:`${PROJECT_OD}/TropFlux_swr_19890101_20091231_BLND.nc` containing ws corrected on OAFLUX grid  
     26; have been produced by :ref:`TropFlux_swr_BLND_19890101_20091231.pro`. 
     27; 
     28; :file:`${PROJECT_OD}/TropFlux_lwr_19890101_20091231.nc` containing lwr corrected on OAFLUX grid have been produced by :ref:`lwr_correction_ncdf.pro`. 
     29; 
     30; :file:`${PROJECT_OD}/TropFlux_t2m_19890101_20091231.nc` containing t2m corrected on OAFLUX grid have been produced by :ref:`t2m_correction_ncdf.pro`. 
     31; 
     32; :file:`${PROJECT_OD}/TropFlux_q2m_19890101_20091231.nc` containing q2m corrected on OAFLUX grid have been produced by :ref:`d2m_to_q2m_erai.pro`. 
     33; 
     34; net heat flux components are written  
     35; in :file:`${PROJECT_OD}/TropFlux_19890101_20091231.nc` 
     36; if this file not already exists. 
     37;  
    1738;     .. graphviz:: 
    1839; 
    19 ;        digraph TropFlux_19890101_20091231 { 
     40;        digraph tropflux_19890101_20091231 { 
    2041;           graph [ 
    2142;           rankdir="LR", 
    2243;           ] 
     44; 
    2345;           mask [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/mask_oaflux_30N30S.nc"]; 
    24 ;           file_sst [shape=ellipse,fontname=Courier,label="/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_sst_19890101_20091231_v20.nc"]; 
    25 ;           file_wind [shape=ellipse,fontname=Courier,label="/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_ws_19890101_20091231_v20.nc"]; 
    26 ;           file_wg [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_gustiness_19890101_20091231_v50.nc"]; 
    27 ;           file_sw [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_BLND_v50.nc"]; 
    28 ;           file_lw [shape=ellipse,fontname=Courier,label="/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_lwr_19890101_20091231_v2.nc"]; 
    29 ;           file_air [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_t2m_19890101_20091231_v50.nc"]; 
    30 ;           file_q [shape=ellipse,fontname=Courier,label="/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/TropFlux_q2m_19890101_20091231_v20.nc"]; 
    31 ; 
    32 ;           ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231_v51.nc"]; 
    33 ; 
    34 ;           TropFlux_19890101_20091231 [shape=box, 
     46;           file_sst [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_sst_19890101_20091231.nc"]; 
     47;           file_ws [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_ws_19890101_20091231.nc"]; 
     48;           file_wg [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_gustiness_19890101_20091231.nc"]; 
     49;           file_swr [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_swr_19890101_20091231_BLND.nc"]; 
     50;           file_lwr [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_lwr_19890101_20091231.nc"]; 
     51;           file_t2m [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_t2m_19890101_20091231.nc"]; 
     52;           file_q2m [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_q2m_19890101_20091231.nc"]; 
     53; 
     54;           file_out[shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_19890101_20091231.nc"]; 
     55; 
     56;           tropflux_19890101_20091231 [shape=box, 
    3557;           fontname=Courier, 
    3658;           color=blue, 
     
    3860;           label="${PROJECT}/src/TropFlux_19890101_20091231.pro"]; 
    3961; 
    40 ;           {mask file_sst file_wind file_wg file_sw file_lw file_air file_q} -> {TropFlux_19890101_20091231} -> {ncfile} 
     62;           {mask file_sst file_ws file_wg file_swr file_lwr file_t2m file_q2m} -> {tropflux_19890101_20091231} -> {file_out} 
    4163; 
    4264;          } 
     
    6486; :: 
    6587; 
     88;  IDL> .compile TropFlux_19890101_20091231 
    6689;  IDL> tropflux_19890101_20091231 
    6790; 
     
    6992; ==== 
    7093; 
    71 ; hard coded directory - usage of ${PROJECT_ID} 
     94; I (fp) do not know how 
     95; ${PROJECT_OD}/TropFlux_swr_19890101_20091231_BLND.nc is produced. 
     96; 
     97; avoid mix lower/uppercase in pro name to avoid compile 
    7298; 
    7399; coding rules 
     
    82108; ========== 
    83109; 
     110; - fplod 20110809T110911Z aedon.locean-ipsl.upmc.fr (Darwin) 
     111; 
     112;   * complete descritption 
     113;   * remove v* from filenames (in and out) 
     114;   * usage of ${PROJECT_OD} 
     115;   * remove return statement 
     116;   * add test on IO files 
     117; 
    84118; - fplod 20101217T140745Z aedon.locean-ipsl.upmc.fr (Darwin) 
    85119; 
     
    101135; 
    102136pro TropFlux_19890101_20091231 
    103 @common 
     137; 
     138@cm_4cal 
     139@cm_4data 
     140@cm_4mesh 
     141@cm_4data 
    104142@cm_project 
    105143; 
     
    132170; 
    133171; check if this file exists 
     172msg='iii : looking for ' + filename_msk 
     173ras = report(msg) 
    134174fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) 
    135175IF fullfilename_msk[0] EQ '' THEN BEGIN 
     
    138178   STOP 
    139179ENDIF 
    140  
     180; 
     181; test if ${PROJECT_OD} defined 
     182CASE project_od_env OF 
     183  '' : BEGIN 
     184         msg = 'eee : ${PROJECT_OD} is not defined' 
     185         ras = report(msg) 
     186       STOP 
     187       END 
     188  ELSE: BEGIN 
     189          msg = 'iii : ${PROJECT_OD} is ' + project_od_env 
     190          ras = report(msg) 
     191        END 
     192 ENDCASE 
     193; 
     194; check if output data will be possible 
     195iodirout = isadirectory(project_od_env) 
     196; 
     197; existence and protection for reading 
     198IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
     199   msg = 'eee : the directory' + iodirout  + ' is not accessible.' 
     200   ras = report(msg) 
     201   STOP 
     202ENDIF 
     203; 
     204; existence and protection for writing 
     205IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 
     206    msg = 'eee : the directory' + iodirout  + ' was not found.' 
     207    ras = report(msg) 
     208    STOP 
     209ENDIF 
     210; 
     211; build sst data filename 
     212filename_sst='TropFlux_sst_19890101_20091231.nc' 
     213; 
     214; check if this file exists 
     215msg='iii : looking for ' + filename_sst 
     216ras = report(msg) 
     217fullfilename_sst = isafile(iodirout + filename_sst, NEW=0, /MUST_EXIST) 
     218IF fullfilename_sst[0] EQ '' THEN BEGIN 
     219   msg = 'eee : the file ' + fullfilename_sst + ' was not found.' 
     220   ras = report(msg) 
     221   STOP 
     222ENDIF 
     223; 
     224; build ws data filename 
     225filename_ws='TropFlux_ws_19890101_20091231.nc' 
     226; 
     227; check if this file exists 
     228msg='iii : looking for ' + filename_ws 
     229ras = report(msg) 
     230fullfilename_ws = isafile(iodirout + filename_ws, NEW=0, /MUST_EXIST) 
     231IF fullfilename_ws[0] EQ '' THEN BEGIN 
     232   msg = 'eee : the file ' + fullfilename_ws + ' was not found.' 
     233   ras = report(msg) 
     234   STOP 
     235ENDIF 
     236; 
     237; build swr data filename 
     238filename_swr='TropFlux_swr_19890101_20091231_BLND.nc' 
     239; 
     240; check if this file exists 
     241msg='iii : looking for ' + filename_swr 
     242ras = report(msg) 
     243fullfilename_swr = isafile(iodirout + filename_swr, NEW=0, /MUST_EXIST) 
     244IF fullfilename_swr[0] EQ '' THEN BEGIN 
     245   msg = 'eee : the file ' + fullfilename_swr + ' was not found.' 
     246   ras = report(msg) 
     247   STOP 
     248ENDIF 
     249; 
     250; build lwr data filename 
     251filename_lwr='TropFlux_lwr_19890101_20091231.nc' 
     252; 
     253; check if this file exists 
     254msg='iii : looking for ' + filename_lwr 
     255ras = report(msg) 
     256fullfilename_lwr = isafile(iodirout + filename_lwr, NEW=0, /MUST_EXIST) 
     257IF fullfilename_lwr[0] EQ '' THEN BEGIN 
     258   msg = 'eee : the file ' + fullfilename_lwr + ' was not found.' 
     259   ras = report(msg) 
     260   STOP 
     261ENDIF 
     262; 
     263; build t2m data filename 
     264filename_t2m='TropFlux_t2m_19890101_20091231.nc' 
     265; 
     266; check if this file exists 
     267msg='iii : looking for ' + filename_t2m 
     268ras = report(msg) 
     269fullfilename_t2m = isafile(iodirout + filename_t2m, NEW=0, /MUST_EXIST) 
     270IF fullfilename_t2m[0] EQ '' THEN BEGIN 
     271   msg = 'eee : the file ' + fullfilename_t2m + ' was not found.' 
     272   ras = report(msg) 
     273   STOP 
     274ENDIF 
     275; 
     276; build q2m data filename 
     277filename_q2m='TropFlux_q2m_19890101_20091231.nc' 
     278; 
     279; check if this file exists 
     280msg='iii : looking for ' + filename_q2m 
     281ras = report(msg) 
     282fullfilename_q2m = isafile(iodirout + filename_q2m, NEW=0, /MUST_EXIST) 
     283IF fullfilename_q2m[0] EQ '' THEN BEGIN 
     284   msg = 'eee : the file ' + fullfilename_q2m + ' was not found.' 
     285   ras = report(msg) 
     286   STOP 
     287ENDIF 
     288; 
     289; build wg data filename 
     290filename_wg='TropFlux_gustiness_19890101_20091231.nc' 
     291; 
     292; check if this file exists 
     293msg='iii : looking for ' + filename_wg 
     294ras = report(msg) 
     295fullfilename_wg = isafile(iodirout + filename_wg, NEW=0, /MUST_EXIST) 
     296IF fullfilename_wg[0] EQ '' THEN BEGIN 
     297   msg = 'eee : the file ' + fullfilename_wg + ' was not found.' 
     298   ras = report(msg) 
     299   STOP 
     300ENDIF 
     301; 
    141302da1=19880101 & da2=20101231 
    142303; 
     
    144305msk=ncdf_lec(fullfilename_msk,var='msk') 
    145306 
    146 dir='/Volumes/Iomega_HDD/TropFlux/input_cor/full_cor/' 
    147 dir1='/Users/pkb/data/TropFlux/' 
    148  
    149 file_sst=dir+'TropFlux_sst_19890101_20091231_v20.nc' 
    150 file_wind=dir+'TropFlux_ws_19890101_20091231_v20.nc' 
    151 file_sw=dir1+'TropFlux_swr_19890101_20091231_BLND_v50.nc' 
    152 file_lw=dir+'TropFlux_lwr_19890101_20091231_v2.nc' 
    153 file_air=dir1+'TropFlux_t2m_19890101_20091231_v50.nc' 
    154 file_q=dir+'TropFlux_q2m_19890101_20091231_v20.nc' 
    155 file_wg=dir1+'TropFlux_gustiness_19890101_20091231_v50.nc' 
    156  
    157 initncdf, file_sst 
    158  
    159 ws=read_ncdf('ws',da1,da2,file=file_wind,/nostr) 
    160 wg=read_ncdf('wg',da1-1,da2,file=file_wg,/nostr) 
     307initncdf, fullfilename_sst 
     308 
     309ws=read_ncdf('ws',da1,da2,file=fullfilename_ws,/nostr) 
     310wg=read_ncdf('wg',da1-1,da2,file=fullfilename_wg,/nostr) 
    161311tt=time & jpt=n_elements(time) 
    162 sst=read_ncdf('sst',da1,da2,file=file_sst,/nostr) 
     312sst=read_ncdf('sst',da1,da2,file=fullfilename_sst,/nostr) 
    163313sst=reform(sst-273.15) 
    164 swd=read_ncdf('swr',da1,da2,file=file_sw,/nostr) 
    165 lw=read_ncdf('lwr',da1,da2,file=file_lw,/nostr) 
     314swd=read_ncdf('swr',da1,da2,file=fullfilename_swr,/nostr) 
     315lw=read_ncdf('lwr',da1,da2,file=fullfilename_lwr,/nostr) 
    166316swd=swd/0.94  ;; converting from net swr to downward swr 
    167317 
    168 t2m=read_ncdf('t2m',da1,da2,file=file_air,/nostr)-273.15   ; in C 
    169 q2m=read_ncdf('q2m',da1,da2,file=file_q,/nostr)    ; in g/kg 
     318t2m=read_ncdf('t2m',da1,da2,file=fullfilename_t2m,/nostr)-273.15   ; in C 
     319q2m=read_ncdf('q2m',da1,da2,file=fullfilename_q2m,/nostr)    ; in g/kg 
    170320 
    171321w=sqrt(ws*ws+wg*wg)  ;; wind corrected for gustiness 
     
    242392xlon=reform(glamt(*,0) ) & ylat=reform(gphit(0,*)) 
    243393 
    244 ncfile='!/Users/pkb/data/TropFlux/TropFlux_19890101_20091231_v51.nc' 
     394ncfile='!${PROJECT_OD}/TropFlux_19890101_20091231.nc' 
    245395lon_attr={units:'degrees_east',long_name:'Longitude'} 
    246396lat_attr={units:'degrees_north',long_name:'Latitude'} 
     
    272422@ncdf_quickwrite 
    273423 
    274 return 
    275424end 
  • trunk/src/TropFlux_NRT_ncdf.pro

    r50 r74  
    11;+ 
    22; 
    3 ; .. _TropFlux_NRT_ncdf_v50.pro: 
     3; .. _TropFlux_NRT_ncdf.pro: 
    44; 
    5 ; ========================= 
    6 ; TropFlux_NRT_ncdf_v50.pro 
    7 ; ========================= 
     5; ===================== 
     6; TropFlux_NRT_ncdf.pro 
     7; ===================== 
    88; 
    99;     .. graphviz:: 
    1010; 
    11 ;        digraph TropFlux_NRT_ncdf_v50 { 
     11;        digraph tropflux_nrt_ncdf { 
    1212;           graph [ 
    1313;           rankdir="LR", 
     
    1717;           file3 [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231_v51.nc"]; 
    1818;           ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_19890101_20091231.nc"]; 
    19 ;           TropFlux_NRT_ncdf_v50 [shape=box, 
     19; 
     20;           tropflux_nrt_ncdf [shape=box, 
    2021;           fontname=Courier, 
    2122;           color=blue, 
    22 ;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/TropFlux_NRT_ncdf_v50.pro", 
    23 ;           label="${PROJECT}/src/TropFlux_NRT_ncdf_v50.pro" ]; 
    24 ;           {file1 file2 file3} -> {TropFlux_NRT_ncdf_v50} -> {ncfile} 
     23;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/TropFlux_NRT_ncdf.pro", 
     24;           label="${PROJECT}/src/TropFlux_NRT_ncdf.pro" ]; 
     25; 
     26;           {file1 file2 file3} -> {tropflux_nrt_ncdf} -> {ncfile} 
    2527;          } 
    2628; 
     
    3941; :: 
    4042; 
    41 ;  IDL> tropflux_nrt_ncdf_v50 
     43;  IDL> tropflux_nrt_ncdf 
    4244; 
    4345; TODO 
     
    5153; ========== 
    5254; 
     55; - fplod 20110809T133815Z cratos (Linux) 
     56; 
     57;   * remove v50 from pro name and in the graph 
     58; 
    5359; - fplod 20101214T112526Z aedon.locean-ipsl.upmc.fr (Darwin) 
    5460; 
    5561;   * add graph 
     62; 
    5663; - fplod 20101214T093615Z aedon.locean-ipsl.upmc.fr (Darwin) 
    5764; 
     
    6370; 
    6471;- 
    65 pro TropFlux_NRT_ncdf_v50 
     72pro TropFlux_NRT_ncdf 
    6673@common 
    6774 
  • trunk/src/TropFlux_swr_BLND_19890101_20091231.pro

    r50 r74  
    77; ======================================= 
    88; 
     9; :file:`${PROJECT_OD}/TropFlux_swr_19890101_20071231_DT.nc` 
     10; containing ++ 
     11; have been produced by :ref:`TropFlux_swr_DT_19890101_20071231.pro`. 
     12; 
     13; :file:`${PROJECT_OD}/TropFlux_swr_19890101_20091231_NRT.nc` 
     14; containing ++ 
     15; have been produced by :ref:`TropFlux_swr_NRT_19890101_20091231.pro`. 
     16; 
     17; :file:`${PROJECT_OD}/TropFlux_gustiness_19890101_20091231.nc` containing ++ 
     18; have been produced by :ref:` cronin_gustiness_ncdf.pro`. 
     19; 
     20; ++ are written 
     21; in :file:`${PROJECT_OD}/TropFlux_swr_19890101_20091231_BLND.nc` 
     22; if this file not already exists. 
     23; 
     24; This file will be used by :ref:`TropFlux_19890101_20091231.pro`. 
     25; 
    926;     .. graphviz:: 
    1027; 
    11 ;        digraph TropFlux_swr_BLND_19890101_20091231 { 
     28;        digraph tropflux_swr_blnd_19890101_20091231 { 
    1229;           graph [ 
    1330;           rankdir="LR", 
    1431;           ] 
    15 ;           file_dt [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc"]; 
    16 ;           file_nrt [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc"]; 
    17 ;           file_gustiness [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_gustiness_19890101_20091231_v50.nc"]; 
    18 ; 
    19 ;           ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_BLND.nc"]; 
    20 ; 
    21 ;           TropFlux_swr_BLND_19890101_20091231 [shape=box, 
     32; 
     33;           file_dt [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_swr_19890101_20071231_DT.nc"]; 
     34;           file_nrt [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_swr_19890101_20091231_NRT.nc"]; 
     35;           file_gustiness [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_gustiness_19890101_20091231.nc"]; 
     36;           file_out [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/TropFlux_swr_19890101_20091231_blnd.nc"]; 
     37; 
     38;           tropflux_swr_blnd_19890101_20091231 [shape=box, 
    2239;           fontname=Courier, 
    2340;           color=blue, 
    2441;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/TropFlux_swr_BLND_19890101_20091231.pro", 
    2542;           label="${PROJECT}/src/TropFlux_swr_BLND_19890101_20091231.pro"]; 
    26 ;           {file_dt file_nrt file_gustiness} -> {TropFlux_swr_BLND_19890101_20091231} ->{ ncfile} 
     43; 
     44;           {file_dt file_nrt file_gustiness} -> {tropflux_swr_blnd_19890101_20091231} -> {file_out} 
    2745; 
    2846;       } 
     
    4159; :: 
    4260; 
     61;  IDL> .compile TropFlux_swr_BLND_19890101_20091231 
    4362;  IDL> tropflux_swr_blnd_19890101_20091231 
    4463; 
     
    4766; ==== 
    4867; 
    49 ; hard coded directory - usage of ${PROJECT_ID} 
     68; avoid mix lower/uppercase in pro name to avoid compile 
    5069; 
    5170; coding rules 
     71; 
     72; complete description 
     73; 
     74; why different date1 and date2 when readind dt and nrt 
     75; 
     76; why two read_ncdf for nrt 
     77; 
     78; KNOWN ISSUES 
     79; ============ 
     80; 
     81; test of existence of fullfilename_in not very efficient because 
     82; MUST_EXIST keyword of :func:`isafile <saxo:isafile>` not yet implemented 
    5283; 
    5384; EVOLUTIONS 
    5485; ========== 
    5586; 
     87; - fplod 20110809T115747Z aedon.locean-ipsl.upmc.fr (Darwin) 
     88; 
     89;   * usage of ${PROJECT_OD} 
     90;   * remove v* from filenames (in and out) 
     91;   * add test on IO files 
     92; 
    5693; - fplod 20101215T085754Z aedon.locean-ipsl.upmc.fr (Darwin) 
    5794; 
     
    68105;- 
    69106pro TropFlux_swr_BLND_19890101_20091231 
    70 @common 
    71 dir="/Users/pkb/data/TropFlux/" 
    72  
    73 file=dir+"TropFlux_swr_19890101_20071231_DT_v50.nc" 
    74 initncdf, file 
    75 dt=read_ncdf("swr", 19890101, 20071231, file=file,/nostr) 
     107; 
     108@cm_4cal 
     109@cm_4data 
     110@cm_4mesh 
     111@cm_4data 
     112@cm_project 
     113; 
     114; 
     115; test if ${PROJECT_OD} defined 
     116CASE project_od_env OF 
     117  '' : BEGIN 
     118         msg = 'eee : ${PROJECT_OD} is not defined' 
     119         ras = report(msg) 
     120       STOP 
     121       END 
     122  ELSE: BEGIN 
     123          msg = 'iii : ${PROJECT_OD} is ' + project_od_env 
     124          ras = report(msg) 
     125        END 
     126 ENDCASE 
     127; 
     128; check if output data will be possible 
     129iodirout = isadirectory(project_od_env) 
     130; 
     131; existence and protection for reading 
     132IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
     133   msg = 'eee : the directory' + iodirout  + ' is not accessible.' 
     134   ras = report(msg) 
     135   STOP 
     136ENDIF 
     137; 
     138; existence and protection for writing 
     139IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 
     140    msg = 'eee : the directory' + iodirout  + ' was not found.' 
     141    ras = report(msg) 
     142    STOP 
     143ENDIF 
     144; 
     145; build dt data filename 
     146filename_dt="TropFlux_swr_19890101_20071231_DT.nc" 
     147; 
     148; check if this file exists 
     149msg='iii : looking for ' + filename_dt 
     150ras = report(msg) 
     151fullfilename_dt = isafile(iodirout + filename_dt, NEW=0, /MUST_EXIST) 
     152IF fullfilename_dt[0] EQ '' THEN BEGIN 
     153   msg = 'eee : the file ' + fullfilename_dt + ' was not found.' 
     154   ras = report(msg) 
     155   STOP 
     156ENDIF 
     157 
     158; build nrt data filename 
     159filename_nrt="TropFlux_swr_19890101_20091231_NRT.nc" 
     160; 
     161; check if this file exists 
     162msg='iii : looking for ' + filename_nrt 
     163ras = report(msg) 
     164fullfilename_nrt = isafile(iodirout + filename_nrt, NEW=0, /MUST_EXIST) 
     165IF fullfilename_nrt[0] EQ '' THEN BEGIN 
     166   msg = 'eee : the file ' + fullfilename_nrt + ' was not found.' 
     167   ras = report(msg) 
     168   STOP 
     169ENDIF 
     170; 
     171; build wg data filename 
     172filename_wg="TropFlux_gustiness_19890101_20091231.nc" 
     173; 
     174; check if this file exists 
     175msg='iii : looking for ' + filename_wg 
     176ras = report(msg) 
     177fullfilename_wg = isafile(iodirout + filename_wg, NEW=0, /MUST_EXIST) 
     178IF fullfilename_wg[0] EQ '' THEN BEGIN 
     179   msg = 'eee : the file ' + fullfilename_wg + ' was not found.' 
     180   ras = report(msg) 
     181   STOP 
     182ENDIF 
     183; 
     184; build output filename 
     185filename_out = 'TropFlux_swr_19890101_20091231_BLND.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_dt 
     195dt=read_ncdf("swr", 19890101, 20071231, file=fullfilename_dt,/nostr) 
    76196help, dt 
    77197 
    78 file=dir+"TropFlux_swr_19890101_20091231_NRT_v50.nc" 
    79 initncdf, file 
    80 nrt=read_ncdf("sw", 20080100, 20100112, file=file,/nostr) 
     198initncdf, fullfilename_nrt 
     199nrt=read_ncdf("sw", 20080100, 20100112, file=fullfilename_nrt,/nostr) 
    81200help, nrt 
    82201 
    83 swr_nrt=read_ncdf("sw", 19880101, 20100112, file=file,/nostr) 
     202swr_nrt=read_ncdf("sw", 19880101, 20100112, file=fullfilename_nrt,/nostr) 
    84203 
    85204swr_dt=[[[dt]],[[nrt]]] 
     
    94213for jt=0,jpt-1 do swr_merged(*,*,jt)=swr_dt(*,*,jt)*a(jt)+(1-a(jt))*swr_nrt(*,*,jt) 
    95214 
    96 file=dir+"TropFlux_gustiness_19890101_20091231_v50.nc" 
    97 initncdf, file 
     215initncdf, file_wg 
    98216time=timegen(7670, units='days', start=julday(1,1,1989,0)) & jpt=n_elements(time) 
    99217lat=reform(gphit(0,0:jpj-1)) 
     
    103221 
    104222time=time-julday(1,1,1950,00,00) 
    105 ncfile='!/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_BLND.nc 
     223ncfile='!' + fullfilename_out 
    106224lon_attr={units:'degrees_east',long_name:'Longitude'} 
    107225lat_attr={units:'degrees_north',long_name:'Latitude'} 
  • trunk/src/TropFlux_swr_DT_19890101_20071231.pro

    r50 r74  
    1010;     .. graphviz:: 
    1111; 
    12 ;        digraph TropFlux_swr_DT_19890101_20071231 { 
     12;        digraph tropflux_swr_dt_19890101_20071231 { 
    1313;           graph [ 
    1414;           rankdir="LR", 
     
    1919;           ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20071231_DT_v50.nc"]; 
    2020; 
    21 ;           TropFlux_swr_DT_19890101_20071231 [shape=box, 
     21;           tropflux_swr_dt_19890101_20071231 [shape=box, 
    2222;           fontname=Courier, 
    2323;           color=blue, 
     
    2525;           label="${PROJECT}/src/TropFlux_swr_DT_19890101_20071231.pro"]; 
    2626; 
    27 ;           {file_swr}-> {TropFlux_swr_DT_19890101_20071231} -> {ncfile} 
     27;           {file_swr}-> {tropflux_swr_dt_19890101_20071231} -> {ncfile} 
    2828; 
    2929;        } 
  • trunk/src/TropFlux_swr_NRT_19890101_20091231.pro

    r50 r74  
    1010;     .. graphviz:: 
    1111; 
    12 ;        digraph TropFlux_swr_NRT_19890101_200912311 { 
     12;        digraph tropflux_swr_nrt_19890101_200912311 { 
    1313;           graph [ 
    1414;           rankdir="LR", 
     
    1717;           file_olr [shape=ellipse,fontname=Courier,label="/Users/pkb/data/heat_budget/NOAA_OLR/olr_oafluxgrid_30n30s_19890101_20091231.nc"]; 
    1818;           ncfile [shape=ellipse,fontname=Courier,label="/Users/pkb/data/TropFlux/TropFlux_swr_19890101_20091231_NRT_v50.nc"]; 
    19 ;           TropFlux_swr_NRT_19890101_200912311 [shape=box, 
     19; 
     20;           tropflux_swr_nrt_19890101_200912311 [shape=box, 
    2021;           fontname=Courier, 
    2122;           color=blue, 
    2223;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/TropFlux_swr_NRT_19890101_200912311.pro", 
    2324;           label="${PROJECT}/src/TropFlux_swr_NRT_19890101_200912311.pro"]; 
    24 ;           {file_sw file_olr}-> {TropFlux_swr_NRT_19890101_200912311} -> {ncfile} 
     25; 
     26;           {file_sw file_olr}-> {tropflux_swr_nrt_19890101_200912311} -> {ncfile} 
    2527;       } 
    2628; 
  • trunk/src/cor30a.pro

    r50 r74  
    6767; ======== 
    6868; 
    69 ; :ref:`TropFlux_19890101_20091231.pro` 
     69; used by :ref:`TropFlux_19890101_20091231.pro` 
    7070; 
    7171; TODO 
    7272; ==== 
    73 ; 
    74 ; hard coded directory - usage of ${PROJECT_ID} 
    7573; 
    7674; coding rules 
Note: See TracChangeset for help on using the changeset viewer.