Changeset 83 for trunk/src


Ignore:
Timestamp:
08/17/11 11:00:48 (13 years ago)
Author:
pinsard
Message:

complete doc in new tools from PK

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/time_axe_modif_tropflux_1d_1989_2010.pro

    r82 r83  
     1;+ 
     2; 
     3; .. _time_axe_modif_tropflux_1d_1989_2010.pro: 
     4; 
     5; ======================================== 
     6; time_axe_modif_tropflux_1d_1989_2010.pro 
     7; ======================================== 
     8; 
     9;     .. graphviz:: 
     10; 
     11;        digraph time_axe_modif_tropflux_1d_1989_2010 { 
     12; 
     13;           file_inout [shape=ellipse,fontname=Courier,label="/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/ws_tropflux_1d_1989_2010.nc"]; 
     14; 
     15;           time_axe_modif_tropflux_1d_1989_2010 [shape=box, 
     16;           fontname=Courier, 
     17;           color=blue, 
     18;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/time_axe_modif_tropflux_1d_1989_2010.pro", 
     19;           label="${PROJECT}/src/time_axe_modif_tropflux_1d_1989_2010.pro"]; 
     20; 
     21;           {file_inout} -> {time_axe_modif_tropflux_1d_1989_2010} -> {file_inout} 
     22; 
     23;        } 
     24; 
     25; 
     26; SEE ALSO 
     27; ======== 
     28; 
     29; :func:`julday <saxo:julday>` 
     30; 
     31; :ref:`time_axe_modif_TropFlux.pro` 
     32; 
     33; EXAMPLES 
     34; ======== 
     35; 
     36; :: 
     37; 
     38;  IDL> time_axe_modif_tropflux_1d_1989_2010 
     39; 
     40; TODO 
     41; ==== 
     42; 
     43; if needed include in the whole process 
     44; 
     45; hard coded directory - usage of ${PROJECT_ID} 
     46; 
     47; coding rules 
     48; 
     49; EVOLUTIONS 
     50; ========== 
     51; 
     52; $Id$ 
     53; 
     54; $URL$ 
     55; 
     56; - fplod 20110817T084839Z aedon.locean-ipsl.upmc.fr (Darwin) 
     57; 
     58;   * minimal header 
     59; 
     60; - pk 20110815 
     61; 
     62;   * provided to fp 
     63; 
     64;- 
    165pro time_axe_modif_tropflux_1d_1989_2010 
    266 
     
    2387ncdf_control, cdfid ,/REDEF ; put in define mode 
    2488; 
    25 ; reading attributs of time   
     89; reading attributs of time 
    2690; 
    2791varid=ncdf_varid(cdfid,'time') 
  • trunk/src/ws_tropflux_1d_to_1m_ncdf.pro

    r82 r83  
     1;+ 
     2; 
     3; .. _ws_tropflux_1d_to_1m_ncdf.pro: 
     4; 
     5; ============================= 
     6; ws_tropflux_1d_to_1m_ncdf.pro 
     7; ============================= 
     8; 
     9; DESCRIPTION 
     10; =========== 
     11; 
     12; convert wind daily file to monthly file 
     13; 
     14; :file:`${PROJECT_OD}/ws_tropflux_1d_1989_2010.nc` 
     15; containing daily ++ 
     16; has been produced by ++ 
     17; 
     18; Montly ++ 
     19; is written in 
     20; :file:`${PROJECT_OD}/ws_tropflux_1m_1989_2010.nc` 
     21; if this file not already exists. 
     22; 
     23;     .. graphviz:: 
     24; 
     25;        digraph ws_tropflux_1d_to_1m_ncdf { 
     26; 
     27;           file_1d [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/ws_tropflux_1d_1989_2010.nc"]; 
     28;           file_1m [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/ws_tropflux_1m_1989_2010.nc"]; 
     29; 
     30;           ws_tropflux_1d_to_1m_ncdf [shape=box, 
     31;           fontname=Courier, 
     32;           color=blue, 
     33;           URL="http://forge.ipsl.jussieu.fr/tropflux/browser/trunk/src/ws_tropflux_1d_to_1m_ncdf.pro", 
     34;           label="${PROJECT}/src/ws_tropflux_1d_to_1m_ncdf.pro"]; 
     35; 
     36;           {file_1d} -> {ws_tropflux_1d_to_1m_ncdf} -> {file_1m} 
     37; 
     38;         } 
     39; 
     40; SEE ALSO 
     41; ======== 
     42; 
     43; :ref:`project_profile.sh` 
     44; 
     45; EXAMPLES 
     46; ======== 
     47; 
     48; :: 
     49; 
     50;  IDL> ws_tropflux_1d_to_1m_ncdf 
     51; 
     52; TODO 
     53; ==== 
     54; 
     55; remove hard coded creation date 
     56; 
     57; include in the whole process 
     58; 
     59; any NCO or CDO equivalent ? 
     60; 
     61; EVOLUTIONS 
     62; ========== 
     63; 
     64; $Id$ 
     65; 
     66; $URL$ 
     67; 
     68; - fplod 20110817T084001Z aedon.locean-ipsl.upmc.fr (Darwin) 
     69; 
     70;   * usage of ${PROJECT_OD} 
     71;   * header 
     72; 
     73; - pk 20110815 
     74; 
     75;   * provided to fp 
     76; 
     77;- 
    178pro ws_tropflux_1d_to_1m_ncdf 
    2 @common 
    3 ;----------------------------------------------------------------------------- 
    4 file="/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/ws_tropflux_1d_1989_2010.nc" 
    5 initncdf, file 
     79; 
     80@cm_4cal 
     81@cm_4data 
     82@cm_4mesh 
     83@cm_4data 
     84@cm_project 
     85; 
     86; test if ${PROJECT_OD} defined 
     87CASE project_od_env OF 
     88  '' : BEGIN 
     89         msg = 'eee : ${PROJECT_OD} is not defined' 
     90         ras = report(msg) 
     91       STOP 
     92       END 
     93  ELSE: BEGIN 
     94          msg = 'iii : ${PROJECT_OD} is ' + project_od_env 
     95          ras = report(msg) 
     96        END 
     97 ENDCASE 
     98; 
     99; check if output data will be possible 
     100iodirout = isadirectory(project_od_env) 
     101; 
     102; existence and protection for reading 
     103IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
     104   msg = 'eee : the directory' + iodirout  + ' is not accessible.' 
     105   ras = report(msg) 
     106   STOP 
     107ENDIF 
     108; 
     109; existence and protection for writing 
     110IF (FILE_TEST(iodirout, /DIRECTORY, /WRITE) EQ 0) THEN BEGIN 
     111    msg = 'eee : the directory' + iodirout  + ' was not found.' 
     112    ras = report(msg) 
     113    STOP 
     114ENDIF 
     115; 
     116; build 1d filename 
     117filename="ws_tropflux_1d_1989_2010.nc" 
     118; 
     119; check if this file exists 
     120fullfilename = isafile(iodirout + filename, NEW=0, /MUST_EXIST) 
     121IF fullfilename[0] EQ '' THEN BEGIN 
     122   msg = 'eee : the file ' + fullfilename + ' was not found.' 
     123   ras = report(msg) 
     124   STOP 
     125ENDIF 
     126; 
     127; build output filename 
     128filename_out = 'ws_tropflux_1m_1989_2010.nc' 
     129fullfilename_out = iodirout + filename_out 
     130; in order to avoid unexpected overwritten 
     131IF (FILE_TEST(fullfilename_out) EQ 1) THEN BEGIN 
     132   msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     133   ras = report(msg) 
     134   STOP 
     135ENDIF 
     136; 
     137initncdf, fullfilename 
    6138st=19890101 & en=20101231 
    7 ws=read_ncdf("ws", st, en, file=file,/nostr) 
     139ws=read_ncdf("ws", st, en, file=fullfilename,/nostr) 
    8140 
    9141help, ws 
     
    33165xlon=reform(glamt(firstxt:lastxt,0) ) & ylat=reform(gphit(0,firstyt:lastyt)) 
    34166 
    35 ncfile='!/Volumes/PAYASAM/TropFlux/ERA_C_1989_2010/ws_tropflux_1m_1989_2010.nc' 
     167ncfile='!' + fullfilename_out 
    36168 
    37169lon_attr={units:'degrees_east',long_name:'Longitude'} 
     
    51183@ncdf_quickwrite 
    52184 
    53 ;------------------------------------------------------------ 
    54185return 
    55186 
Note: See TracChangeset for help on using the changeset viewer.