Changeset 31


Ignore:
Timestamp:
01/24/11 17:50:19 (13 years ago)
Author:
pinsard
Message:

improve rest headers thanks to sphinx update (1.0.4 to 1.0.7)

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/adm/makefile

    r30 r31  
    2222# EVOLUTIONS 
    2323# ========== 
     24# 
     25# - fplod 20110110T165518Z aedon.locean-ipsl.upmc.fr (Darwin) 
     26# 
     27#   * add odv files 
    2428# 
    2529# - fplod 20110106T135021Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    117121        sed -e "s+$(DIRSRC)/test/+$(DIRTMP)/sphinx_tmpdir/manuals/+g" \ 
    118122            -e "s+\.jnl+.jnl.rst+g") 
     123 
     124LIST_SRCODV = \ 
     125$(DIRSRC)/test/read.cmd 
     126 
     127LIST_SRCODV_RST = \ 
     128$(shell echo "$(LIST_SRCODV)" | \ 
     129        sed -e "s+$(DIRSRC)/test/+$(DIRTMP)/sphinx_tmpdir/manuals/+g" \ 
     130            -e "s+\.cmd+.cmd.rst+g") 
    119131 
    120132LIST_SRCPYTHON = \ 
     
    228240$(LIST_SRCMATLAB_RST) \ 
    229241$(LIST_SRCFERRET_RST) \ 
     242$(LIST_SRCODV_RST) \ 
    230243$(LIST_SRCPYTHON) 
    231244        @sphinx-build -b man -c $(DIRADM)/sphinx \ 
     
    251264$(LIST_SRCMATLAB_RST) \ 
    252265$(LIST_SRCFERRET_RST) \ 
     266$(LIST_SRCODV_RST) \ 
    253267$(LIST_SRCPYTHON) 
    254268        @cp $(DIRADM)/index.rst $(DIRTMP)/sphinx_tmpdir/ 
     
    274288$(LIST_SRCMATLAB_RST) \ 
    275289$(LIST_SRCFERRET_RST) \ 
     290$(LIST_SRCODV_RST) \ 
    276291$(LIST_SRCPYTHON) 
    277292        @cp $(DIRADM)/index.rst $(DIRTMP)/sphinx_tmpdir/ 
     
    299314$(LIST_SRCMATLAB_RST) \ 
    300315$(LIST_SRCFERRET_RST) \ 
     316$(LIST_SRCODV_RST) \ 
    301317$(LIST_SRCPYTHONS) 
    302318        @cp $(DIRADM)/index.rst $(DIRTMP)/sphinx_tmpdir/ 
     
    369385        done >> $@ 
    370386        @echo " " >> $@ 
     387        @echo "ODV scripts" >> $@ 
     388        @echo "ODV scripts" | tr [:print:] = >> $@ 
     389        @echo ".. toctree::" >> $@ 
     390        @echo "   :maxdepth: 1" 1>> $@ 
     391        @echo "   :glob:" 1>> $@ 
     392        @echo " " >> $@ 
     393        @for file in $(LIST_SRCODV); \ 
     394        do \ 
     395           echo "   manuals/$$(basename $${file})"; \ 
     396        done >> $@ 
     397        @echo " " >> $@ 
    371398        @echo "PYTHON scripts" >> $@ 
    372399        @echo "PYTHON scripts" | tr [:print:] = >> $@ 
     
    405432        @$(DIRADM)/extract_rst.sh -i $< -l ferret -o $@ 
    406433 
     434$(DIRTMP)/sphinx_tmpdir/manuals/%.cmd.rst : $(DIRSRC)/test/%.cmd  $(DIRADM)/extract_rst.sh 
     435        @$(DIRADM)/extract_rst.sh -i $< -l sh -o $@ 
     436 
    407437$(DIRDESIGN)/images/%.png : $(DIRDESIGN)/images/%.svg 
    408438        @convert $< $@ 
  • trunk/src/sst_correction_ncdf.pro

    r20 r31  
    11;+ 
    22; 
    3 ; .. sst_correction_ncdf.pro: 
     3; .. _sst_correction_ncdf.pro: 
    44; 
    55; ======================= 
  • trunk/src/test/read.jnl

    r30 r31  
    1919! ======== 
    2020! 
    21 ! ferret> CANCEL DATA/ALL 
    22 ! ferret> GO read 
     21! :: 
     22! 
     23!  ferret> GO read 
     24! 
     25! or:: 
     26! 
     27!  $ ferret -nojnl -script read.jnl 
    2328! 
    2429! SEE ALSO 
     
    6368!- 
    6469! 
     70CANCEL DATA/ALL 
     71CANCEL SYMBOL/ALL 
     72! 
    6573! pour creer des metafile convertible en ps 
    6674set mode metafile  
     
    6876go bold  
    6977 
    70 LET yyyymmdd_b = "19890101" 
    71 LET yyyymmdd_e = "20091231" 
     78!++ http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2010/msg00690.html 
     79!let mm = 1 
     80!say `mm,zw=2` 
     81! ++ http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2009/msg00771.html 
     82!repeat/range=1:2/name=m (use "http://dodsserver/sst_`m`.nc"; show dat) 
     83!repeat/range=1:12/name=mm ( show sym mm; say `mm,zw=2`)  
     84!repeat/range=1:12/name=mm ( show sym mm; LET CMM B`mm,zw=2`A; LIST CMM)  
    7285 
    73 ! ++ pb floatstr si yyyymmdd_b est un entier LET fullfilename = "/usr/zeus/incas/fplod/tropflux_d"+"TropFlux_" + floatstr(yyyymmdd_b,"(I8.8)") + "_" + floatstr(yyyymmdd_e,"(I8.8)") + ".nc" 
    74 LET filename = "TropFlux_" + yyyymmdd_b + "_" + yyyymmdd_e + ".nc" 
    75 LET fullfilename = "/usr/zeus/incas/fplod/tropflux_d/" + filename 
    76 LIST fullfilename 
     86! pour les log 
     87! http://www.pmel.noaa.gov/maillists/tmap/ferret_users/fu_2009/msg00036.html 
     88show symbol session* 
     89let date = "($session_date)" 
     90let datetime =  "($session_date) ($session_time)" 
     91 
     92! DEFINE VARIABLE yyyymmdd_b = "19890101" 
     93! DEFINE VARIABLE yyyymmdd_e = "20091231" 
     94!++ DEFINE VARIABLE cb = {spawn:printf '%8.8d' `b` "} 
     95 
     96DEFINE SYMBOL yyyymmdd_b = 19890101 
     97DEFINE SYMBOL yyyymmdd_e = 20091231 
     98 
     99! ++ pb floatstr si yyyymmdd_b est un entier DEFINE VARIABLE fullfilename = "/usr/zeus/incas/fplod/tropflux_d"+"TropFlux_" + floatstr(yyyymmdd_b,"(I8.8)") + "_" + floatstr(yyyymmdd_e,"(I8.8)") + ".nc" 
     100!DEFINE VARIABLE filename = "TropFlux_" + yyyymmdd_b + "_" + yyyymmdd_e + ".nc" 
     101DEFINE SYMBOL filename = TropFlux_($yyyymmdd_b)_($yyyymmdd_e).nc 
     102! ++ $TROPFLUX_D defini ? 
     103!DEFINE SYMBOL tropflux_d = /usr/zeus/incas/fplod/tropflux_d/ 
     104!DEFINE SYMBOL fullfilename = ($tropflux_d)($filename) 
     105DEFINE VARIABLE tropflux_d = {spawn:"echo $TROPFLUX_ID"} 
     106DEFINE SYMBOL fullfilename = "$tropflux_d($filename)" 
     107CANCEL SYMBOL filename 
    77108! open  
     109! test if the file exists 
     110!++DEFINE VARIABLE a = {"dummy", SPAWN:"ls `fullfilename`"}  
     111!++DEFINE VARIABLE nfiles = `a,RETURN=IEND` 
     112!++CANCEL a 
     113!++LIST nfiles 
     114!++IF `nfiles EQ 2` THEN EXIT 
     115!++CANCEL nfiles 
     116 
    78117! ++ use fullfilename 
    79 use "/usr/zeus/incas/fplod/tropflux_d/TropFlux_19890101_20091231.nc" 
     118!use "/usr/zeus/incas/fplod/tropflux_d/TropFlux_19890101_20091231.nc" 
     119use "`fullfilename`" 
    80120! 
    81121! plot the first timestep of swr 
     
    86126! 
    87127! create a Postscript file 
    88 !++ sp Fprint -l cps -p portrait -o TropFlux_19890101_20091231.ferret.ps metafile.plt 
     128sp Fprint -l cps -p portrait -o TropFlux_19890101_20091231.ferret.ps metafile.plt 
    89129! 
    90 !  create a GIF file 
     130! create a GIF file 
    91131frame/file=TropFlux_19890101_20091231.ferret.gif 
    92132! 
  • trunk/src/test/read.m

    r29 r31  
    3535% TODO 
    3636% ==== 
     37% 
     38% 
     39% ++ see http://www.esrl.noaa.gov/psd/data/gridded/tools.html 
    3740% 
    3841% make it usable for real end-user 
  • trunk/src/test/read.py

    r29 r31  
    77from Numeric import * 
    88from Scientific.IO.NetCDF import * 
     9from pylab import * 
     10 
    911import time 
    1012 
     
    4648========== 
    4749 
     50- fplod 20110120T164029Z aedon.locean-ipsl.upmc.fr (Darwin) 
     51 
     52  * thanks to http://www.unidata.ucar.edu/software/netcdf/examples/programs/sfc_pres_temp_rd.py 
     53 
     54- fplod 20110107T134657Z aedon.locean-ipsl.upmc.fr (Darwin) 
     55 
     56  * add a main level for sphinx referencement (not yet ok) 
     57 
    4858- fplod 20110106T133620Z aedon.locean-ipsl.upmc.fr (Darwin) 
    4959 
     
    5363""" 
    5464 
    55 yyyymmdd_b=19890101; 
    56 yyyymmdd_e=20091231; 
    57 # 
    58 filename = 'TropFlux_' + str(yyyymmdd_b) + '_' + str(yyyymmdd_e) + '.nc' 
    59 fullfilename = '/usr/zeus/incas/fplod/tropflux_d/' + filename 
    60 # 
    61 file = NetCDFFile(fullfilename, 'r') 
    62 print file.dimensions 
    63 print file.variables 
    64 # 
    65 # close NetCDF file 
    66 file.close() 
     65if __name__ == '__main__': 
    6766 
    68  
     67   yyyymmdd_b=19890101; 
     68   yyyymmdd_e=20091231; 
     69   # 
     70   filename = 'TropFlux_' + str(yyyymmdd_b) + '_' + str(yyyymmdd_e) + '.nc' 
     71   fullfilename = '/usr/zeus/incas/fplod/tropflux_d/' + filename 
     72   # 
     73   file = NetCDFFile(fullfilename, 'r') 
     74   # controle print 
     75   print file.dimensions 
     76   print file.variables 
     77   # 
     78   # get latitudes 
     79   ydata=file.variables['latitude'] 
     80   # controle print 
     81   print ydata.units 
     82   # get longitudes 
     83   xdata=file.variables['longitude'] 
     84   # get swr variable 
     85   zdata=file.variables['swr'] 
     86   # controle print 
     87   print zdata.units 
     88   # plot  
     89   xlabel('xlabel+todo') 
     90   ylabel('ylabel+todo') 
     91   # close NetCDF file 
     92   file.close() 
  • trunk/src/tropflux_profile.sh

    r2 r31  
    4444# ======== 
    4545# 
    46 # for IDL/GDL environment : 
    47 # 
    48 # :ref:`tropflux_startup.pro` 
    4946# 
    5047# EXAMPLES 
Note: See TracChangeset for help on using the changeset viewer.