Changeset 203 for trunk/src


Ignore:
Timestamp:
02/11/14 18:41:24 (10 years ago)
Author:
pinsard
Message:

fix thanks to coding rules

Location:
trunk/src
Files:
99 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/add_19890101.sh

    r199 r203  
    77# .. _add_19890101.sh: 
    88# 
    9 # ================== 
    10 # add_19890101.sh  
    11 # ================== 
     9# =============== 
     10# add_19890101.sh 
     11# =============== 
    1212# 
    1313# SYNOPSIS 
    1414# ======== 
    1515# 
    16 # :: 
    17 # 
    18 $ add_19890101.sh [--debug] 
     16# .. code-block:: bash 
     17# 
     18  add_19890101.sh [--debug] 
    1919# 
    2020# DESCRIPTION 
     
    2828# 
    2929# :file:`${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc` 
    30 # containing  
     30# containing 
    3131# ++ 
    3232# has been produced by 
    3333# :func:`interp_erai_lwr`. 
    34 # repeat the first time step in  
     34# repeat the first time step in 
    3535# 
    3636# File :file:`${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc` 
     
    3838# if this file not already exists. 
    3939# 
    40 # This output file  
     40# This output file 
    4141# :file:`${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc` 
    42 # must be processed after by  
     42# must be processed after by 
    4343# :func:`lwr_correction_ncdf`. 
    44 #  
     44# 
    4545# Log file is written on :file:`${PROJECT_LOG}/add_19890101.sh.log.{YYYYMMDDTHHMMSSZ}` 
    4646# 
     
    4949#        digraph add_19890101 { 
    5050# 
    51 #           filein [shape=ellipse,fontname=Courier,label="$PROJECT_OD/erai_lwr_19890102_20091231_oafluxgrid.nc"]; 
    52 #           fileout [shape=ellipse,fontname=Courier,label="$PROJECT_OD/erai_lwr_19890101_20091231_oafluxgrid.nc"]; 
     51#           filein [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc"]; 
     52#           fileout [shape=ellipse,fontname=Courier,label="${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc"]; 
    5353# 
    5454#           add_19890101 [shape=box, 
     
    6565# ======== 
    6666# 
    67 # To produce $PROJECT_OD/erai_lwr_19890101_20091231_oafluxgrid.nc  
    68 # from $PROJECT_OD/erai_lwr_19890102_20091231_oafluxgrid.nc :: 
    69 # 
    70 #  $ add_19890101.sh --debug 
    71 # 
    72 # And look at log file with :: 
    73 # 
    74 #  $ tlogd.sh add_19890101 
     67# To produce ${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc 
     68# from ${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc : 
     69# 
     70# .. code-block:: bash 
     71# 
     72#    add_19890101.sh --debug 
     73# 
     74# And look at log file with : 
     75# 
     76# .. code-block:: bash 
     77# 
     78#    tlogd.sh add_19890101 
    7579# 
    7680# and of course on files in ${PROJECT_OD}. 
     
    7983# ==== 
    8084# 
    81 # To see the 3 first time values in input and files:: 
    82 # 
    83 #  $ ncks -s "%16.10f\n" -v tt -d time,0,2 ${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc  
     85# To see the 3 first time values in input and files: 
     86# 
     87# .. code-block:: bash 
     88# 
     89#    ncks -s "%16.10f\n" -v tt -d time,0,2 ${PROJECT_OD}/erai_lwr_19890102_20091231_oafluxgrid.nc 
     90# 
     91# .. parsed-literal:: 
     92# 
    8493#    14246.0000000005 
    8594#    14247.0000000005 
    8695#    14248.0000000005 
    8796# 
    88 #  $ ncks -s "%16.10f\n" -v tt -d time,0,2 ${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc  
     97# .. code-block:: bash 
     98# 
     99#    ncks -s "%16.10f\n" -v tt -d time,0,2 ${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc 
     100# 
     101# .. parsed-literal:: 
     102# 
    89103#    14245.0000000005 
    90104#    14246.0000000005 
     
    93107# while : 
    94108# 
    95 #   $ idl 
    96 #   print, julday(01, 01, 1989,12)-julday(01, 01, 1950,0) 
    97 #   14245.500 
    98 #   print, julday(01, 01, 1989,12)-julday(01, 01, 1950,0) +1 
    99 #   14246.500 
     109# .. code-block:: idl 
     110# 
     111#    print, julday(01, 01, 1989,12)-julday(01, 01, 1950,0) 
     112# 
     113# .. parsed-literal:: 
     114# 
     115#    14245.500 
     116# 
     117# .. code-block:: idl 
     118# 
     119#    print, julday(01, 01, 1989,12)-julday(01, 01, 1950,0) +1 
     120# 
     121# .. parsed-literal:: 
     122# 
     123#    14246.500 
    100124# 
    101125# SEE ALSO 
     
    116140# coding rules 
    117141# 
    118 # won't it be more conveniant to add this articifial time step in  
     142# won't it be more conveniant to add this articifial time step in 
    119143# the IDL creation tool interp_erai_lwr_1989_2009.pro. 
    120144# It will allow to avoid a shell interruption in the IDL processing chain. 
     
    128152# remove hard coded end time 
    129153# 
    130 # get rid of this long mesage on cratos:: 
    131 # 
    132 #    ncrcat: WARNING Variable lwr has attribute "missing_value" but not "_FillValue". To  
     154# get rid of this long mesage on cratos: 
     155# 
     156# .. parsed-literal:: 
     157# 
     158#    ncrcat: WARNING Variable lwr has attribute "missing_value" but not "_FillValue". To 
    133159#    comply with netCDF conventions, NCO ignores values that equal the _FillValue attribu 
    134160#    te when performing arithmetic. Confusingly, values equal to the missing_value should 
    135 #     also be neglected. However, it is tedious and (possibly) computationally expensive  
     161#     also be neglected. However, it is tedious and (possibly) computationally expensive 
    136162#    to check each value against multiple missing values during arithmetic on large varia 
    137163#    bles. So NCO thinks that processing variables with a "missing_value" attribute and n 
     
    150176# valeurs manquantes dans les softs IDL !!! 
    151177# 
    152 # 
    153178# EVOLUTIONS 
    154179# ========== 
     
    166191system=$(uname) 
    167192case "${system}" in 
    168    AIX|IRIX64) 
    169       echo "www : no specific posix checking" 
    170       date_cmd=date 
    171    ;; 
    172    Darwin) 
    173       set -o posix 
    174       date_cmd=gdate 
    175    ;; 
    176    Linux) 
    177       set -o posix 
    178       date_cmd=date 
    179    ;; 
    180    *) 
    181      set -o posix 
    182    ;; 
     193    AIX|IRIX64) 
     194        echo "www : no specific posix checking" 
     195        date_cmd=date 
     196    ;; 
     197    Darwin) 
     198        set -o posix 
     199        date_cmd=gdate 
     200    ;; 
     201    Linux) 
     202        set -o posix 
     203        date_cmd=date 
     204    ;; 
     205    *) 
     206        set -o posix 
     207    ;; 
    183208esac 
    184209unset system 
     
    201226if [ ${#} -lt ${minargcount} ] 
    202227then 
    203    echo "${command} : eee : not enought arguments" 
    204    echo "${usage}" 
    205    exit 1 
     228    echo "${command} : eee : not enought arguments" 
     229    echo "${usage}" 
     230    exit 1 
    206231fi 
    207232# 
    208233while [ ${#} -gt 0 ] 
    209234do 
    210    case ${1} in 
    211       --debug) 
    212          debug=1 
    213       ;; 
    214       *) 
    215         # anything else 
    216         echo "${command} : eee : unknown option ${1}" 
    217         echo "${command} : eee : ${usage}" 
    218         exit 1 
    219       ;; 
    220    esac 
    221    # next flag 
    222    shift 
     235    case ${1} in 
     236        --debug) 
     237            debug=1 
     238        ;; 
     239        *) 
     240            # anything else 
     241            echo "${command} : eee : unknown option ${1}" 
     242            echo "${command} : eee : ${usage}" 
     243            exit 1 
     244        ;; 
     245    esac 
     246    # next flag 
     247    shift 
    223248done 
    224249# 
     
    231256if [ ${status} -ne 0 ] 
    232257then 
    233    echo "${command} : eee : tool ${tool} not found" 
    234    exit 1 
     258    echo "${command} : eee : tool ${tool} not found" 
     259    exit 1 
    235260fi 
    236261unset status 
     
    242267if [ ${status} -ne 0 ] 
    243268then 
    244    echo "${command} : eee : tool ${tool} not found" 
    245    exit 1 
     269    echo "${command} : eee : tool ${tool} not found" 
     270    exit 1 
    246271fi 
    247272unset status 
     
    253278if [ ${status} -ne 0 ] 
    254279then 
    255    echo "${command} : eee : tool ${tool} not found" 
    256    exit 1 
     280    echo "${command} : eee : tool ${tool} not found" 
     281    exit 1 
    257282fi 
    258283unset status 
     
    262287if [ "${PROJECT_LOG}" = "" ] 
    263288then 
    264    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    265    exit 1 
     289    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     290    exit 1 
    266291fi 
    267292# 
     
    269294if [ ! -d ${PROJECT_LOG} ] 
    270295then 
    271    echo "${command} : eee : ${PROJECT_LOG} not found" 
    272    exit 1 
     296    echo "${command} : eee : ${PROJECT_LOG} not found" 
     297    exit 1 
    273298fi 
    274299# 
     
    276301if [ ! -x ${PROJECT_LOG} ] 
    277302then 
    278    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    279    exit 1 
     303    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     304    exit 1 
    280305fi 
    281306# 
     
    283308if [ ! -w ${PROJECT_LOG} ] 
    284309then 
    285    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    286    exit 1 
     310    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     311    exit 1 
    287312fi 
    288313# 
     
    304329then 
    305330    echo " eee : ${filein} not found" 1>> ${log} 
    306     exit 1  
     331    exit 1 
    307332fi 
    308333fileout=${PROJECT_OD}/erai_lwr_19890101_20091231_oafluxgrid.nc 
    309334if [ -f ${fileout} ] 
    310335then 
    311       echo "eee : ${fileout} already exists" 1>>${log} 
    312       exit 1 
     336    echo "eee : ${fileout} already exists" 1>>${log} 
     337    exit 1 
    313338fi 
    314339# 
     
    331356# substract 1 to tt to simulate 19890101 
    332357ncap2 -h -s "tt=tt-1" \ 
    333     ${PROJECT_OD}/erai_lwr_step19890102.nc \ 
    334     ${PROJECT_OD}/erai_lwr_step19890101.nc 
    335 status=${?} 
    336 if [ ${status} -ne 0 ]  
     358${PROJECT_OD}/erai_lwr_step19890102.nc \ 
     359${PROJECT_OD}/erai_lwr_step19890101.nc 
     360status=${?} 
     361if [ ${status} -ne 0 ] 
    337362then 
    338363    echo "eee : pb with ncap2" >> ${log} 2>&1 
    339364    ncdump -h ${PROJECT_OD}/erai_lwr_step19890102.nc >> ${log} 2>&1 
    340365    exit 1 
    341 fi   
     366fi 
    342367unset status 
    343368ls -l ${PROJECT_OD}/erai_lwr_step19890102.nc >> ${log} 2>&1 
     
    345370# 
    346371# ++ check if tt[0] is really 19890101 
    347 #  
     372# 
    348373rm ${fileout}_bad_timerange 2> /dev/null 
    349374ncrcat -h \ 
    350        ${PROJECT_OD}/erai_lwr_step19890101.nc \ 
    351        ${filein} \ 
    352        ${fileout}_bad_timerange >> ${log} 2>&1 
    353 status=${?} 
    354 if [ ${status} -ne 0 ]  
     375${PROJECT_OD}/erai_lwr_step19890101.nc \ 
     376${filein} \ 
     377${fileout}_bad_timerange >> ${log} 2>&1 
     378status=${?} 
     379if [ ${status} -ne 0 ] 
    355380then 
    356381    echo "eee : pb with ncrcat" >> ${log} 2>&1 
     
    358383    ncdump -h ${filein} >> ${log} 2>&1 
    359384    exit 1 
    360 fi   
     385fi 
    361386unset status 
    362387# 
    363388ncatted -h -a timerange,global,o,c,"19890101 - 20091231" \ 
    364        ${fileout}_bad_timerange \ 
    365        ${fileout} >> ${log} 2>&1 
     389${fileout}_bad_timerange \ 
     390${fileout} >> ${log} 2>&1 
    366391status=${?} 
    367392if [ ${status} -ne 0 ] 
     
    370395    ncdump -h ${fileout}_bad_timerange >> ${log} 2>&1 
    371396    exit 1 
    372 fi  
     397fi 
    373398unset status 
    374399# 
  • trunk/src/basic_variable_evaluation_tpr_timeseries.pro

    r180 r203  
    3131; ======== 
    3232; 
    33 ; :: 
     33; .. code-block:: idl 
    3434; 
    35 ;   date1 = 20000101L 
    36 ;   date2 = 20091231L 
    37 ;   basic_variable_evaluation_tpr_timeseries, date1, date2 
     35;    date1 = 20000101L 
     36;    date2 = 20091231L 
     37;    basic_variable_evaluation_tpr_timeseries, date1, date2 
    3838; 
    3939; EVOLUTIONS 
     
    130130 
    131131 
    132            extract_tpr_location,var,box, $ 
    133                 var_tpr 
    134            var_tpr=reform(var_tpr) 
     132       extract_tpr_location,var,box, $ 
     133       var_tpr 
     134       var_tpr=reform(var_tpr) 
    135135 
    136            stats_5d, tpr,var_tpr, $  ;; tpr=TPR observation and var_tpr=gridded product extracted at TPR location 
    137               cor, bias, std, rmsd 
     136       stats_5d, tpr,var_tpr, $  ;; tpr=TPR observation and var_tpr=gridded product extracted at TPR location 
     137       cor, bias, std, rmsd 
    138138 
    139            printf, 1, x, y, cor, bias, std, rmsd, format='(f6.2, 3x, f6.2, 3x, f4.2, 3x, f7.2, 3x, f4.2, 3x, f5.2)' 
    140            cstat=string(cor, bias, std, rmsd, format='(f4.2,3x,f7.2,3x,f4.2,3x,f5.2)') 
    141            print, cstat 
     139       printf, 1, x, y, cor, bias, std, rmsd, format='(f6.2, 3x, f6.2, 3x, f4.2, 3x, f7.2, 3x, f4.2, 3x, f5.2)' 
     140       cstat=string(cor, bias, std, rmsd, format='(f4.2,3x,f7.2,3x,f4.2,3x,f5.2)') 
     141       print, cstat 
    142142 
    143 ;;         PLOTTING THE TIME-SERIES 
    144            array=[tpr, var_tpr] & mi=min(array,/nan) & ma=max(array,/nan) & int=(ma-mi)/3. 
    145            pltt, ts_smooth(tpr,5,/nan), "t",/rempl, small=[1,3,1], lct=65, $ 
    146                  title='Five day stats are shown below.  TPR (black) and Product (red) at'+csite+' ', charsize=1., $ 
    147                  subtitle=cstat 
    148            ind=where(finite(tpr,/nan)) & var_tpr(ind)=!Values.f_nan 
    149            pltt, ts_smooth(var_tpr,5,/nan), "t",/ov1d, color=250 
    150            erase 
    151            mooring=[mooring,tpr] & product=[product,var_tpr] 
     143;;     PLOTTING THE TIME-SERIES 
     144       array=[tpr, var_tpr] & mi=min(array,/nan) & ma=max(array,/nan) & int=(ma-mi)/3. 
     145       pltt, ts_smooth(tpr,5,/nan), "t",/rempl, small=[1,3,1], lct=65, $ 
     146       title='Five day stats are shown below.  TPR (black) and Product (red) at'+csite+' ', charsize=1., $ 
     147       subtitle=cstat 
     148       ind=where(finite(tpr,/nan)) & var_tpr(ind)=!Values.f_nan 
     149       pltt, ts_smooth(var_tpr,5,/nan), "t",/ov1d, color=250 
     150       erase 
     151       mooring=[mooring,tpr] & product=[product,var_tpr] 
    152152    endif 
    153153endfor 
  • trunk/src/change_creation_date.sh

    r202 r203  
    1414# ======== 
    1515# 
    16 # :: 
    17 # 
    18 $ change_creation_date.sh [--debug] -c yyyymmdd -d directory 
     16# .. code-block:: bash 
     17# 
     18  change_creation_date.sh [--debug] -c yyyymmdd -d directory 
    1919# 
    2020# DESCRIPTION 
     
    5454# ======== 
    5555# 
    56 # To modify files under /usr/lodyc/incas/fplod/tropflux_d/to_be_published/:: 
    57 # 
    58 #  $ change_creation_date.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -c 20130725 
    59 # 
    60 # And look at log file with :: 
    61 # 
    62 #  $ tlogd.sh change_creation_date 
     56# To modify files under /usr/lodyc/incas/fplod/tropflux_d/to_be_published/: 
     57# 
     58# .. code-block:: bash 
     59# 
     60#    change_creation_date.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -c 20130725 
     61# 
     62# And look at log file with : 
     63# 
     64# .. code-block:: bash 
     65# 
     66#    tlogd.sh change_creation_date 
    6367# 
    6468# TIPS 
     
    99103system=$(uname) 
    100104case "${system}" in 
    101    AIX|IRIX64) 
    102       echo "www : no specific posix checking" 
    103       date_cmd=date 
    104    ;; 
    105    Darwin) 
    106       set -o posix 
    107       date_cmd=gdate 
    108    ;; 
    109    Linux) 
    110       set -o posix 
    111       date_cmd=date 
    112    ;; 
    113    *) 
    114      set -o posix 
    115    ;; 
     105    AIX|IRIX64) 
     106        echo "www : no specific posix checking" 
     107        date_cmd=date 
     108    ;; 
     109    Darwin) 
     110        set -o posix 
     111        date_cmd=gdate 
     112    ;; 
     113    Linux) 
     114        set -o posix 
     115        date_cmd=date 
     116    ;; 
     117    *) 
     118        set -o posix 
     119    ;; 
    116120esac 
    117121unset system 
     
    134138if [ ${#} -lt ${minargcount} ] 
    135139then 
    136    echo "${command} : eee : not enought arguments" 
    137    echo "${usage}" 
    138    exit 1 
     140    echo "${command} : eee : not enought arguments" 
     141    echo "${usage}" 
     142    exit 1 
    139143fi 
    140144# 
    141145while [ ${#} -gt 0 ] 
    142146do 
    143    case ${1} in 
    144       -c) 
    145          yyyymmdd=${2} 
    146          shift 
    147       ;; 
    148       -d) 
    149          dirin=${2} 
    150          shift 
    151       ;; 
    152       --debug) 
    153          debug=1 
    154       ;; 
    155       *) 
    156         # anything else 
    157         echo "${command} : eee : unknown option ${1}" 
    158         echo "${command} : eee : ${usage}" 
    159         exit 1 
    160       ;; 
    161    esac 
    162    # next flag 
    163    shift 
     147    case ${1} in 
     148        -c) 
     149            yyyymmdd=${2} 
     150            shift 
     151        ;; 
     152        -d) 
     153            dirin=${2} 
     154            shift 
     155        ;; 
     156        --debug) 
     157            debug=1 
     158        ;; 
     159        *) 
     160            # anything else 
     161            echo "${command} : eee : unknown option ${1}" 
     162            echo "${command} : eee : ${usage}" 
     163            exit 1 
     164        ;; 
     165    esac 
     166    # next flag 
     167    shift 
    164168done 
    165169# 
     
    167171if [ ! -d ${dirin} ] 
    168172then 
    169    echo " eee : ${dirin} not found" 
    170    exit 1 
     173    echo " eee : ${dirin} not found" 
     174    exit 1 
    171175fi 
    172176# 
     
    174178if [ ! -x ${dirin} ] 
    175179then 
    176    echo " eee : ${dirin} not reachable" 
    177    exit 1 
     180    echo " eee : ${dirin} not reachable" 
     181    exit 1 
    178182fi 
    179183#++ check yyyymmdd validity 
     
    184188if [ ${status} -ne 0 ] 
    185189then 
    186    echo "${command} : ${LINENO} : eee : tool ${tool} not found" 
    187    exit 1 
     190    echo "${command} : ${LINENO} : eee : tool ${tool} not found" 
     191    exit 1 
    188192fi 
    189193unset status 
     
    193197if [ "${PROJECT_LOG}" = "" ] 
    194198then 
    195    echo "${command} : ${LINENO} : eee : \${PROJECT_LOG} not defined" 
    196    exit 1 
     199    echo "${command} : ${LINENO} : eee : \${PROJECT_LOG} not defined" 
     200    exit 1 
    197201fi 
    198202# 
     
    200204if [ ! -d ${PROJECT_LOG} ] 
    201205then 
    202    echo "${command} : eee : ${PROJECT_LOG} not found" 
    203    exit 1 
     206    echo "${command} : eee : ${PROJECT_LOG} not found" 
     207    exit 1 
    204208fi 
    205209# 
     
    207211if [ ! -x ${PROJECT_LOG} ] 
    208212then 
    209    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    210    exit 1 
     213    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     214    exit 1 
    211215fi 
    212216# 
     
    214218if [ ! -w ${PROJECT_LOG} ] 
    215219then 
    216    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    217    exit 1 
     220    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     221    exit 1 
    218222fi 
    219223# 
     
    236240period_list="daily monthly" 
    237241list_filein="" 
    238 for var in $varlist 
     242for var in ${varlist} 
    239243do 
    240      for period in ${period_list} 
    241      do 
    242          if [ "${period}" == "daily" ] 
    243          then 
     244    for period in ${period_list} 
     245    do 
     246        if [ "${period}" == "daily" ] 
     247        then 
    244248            suffix=1d 
    245          else 
     249        else 
    246250            suffix=1m 
    247          fi 
    248          filein=${dirin}/${period}/${var}_tropflux_${suffix}_1979_2013.nc 
    249          if [ ! -f ${filein} ] 
    250          then 
    251              echo " eee : ${filein} not found" 1>> ${log} 
    252              exit 1 
    253          else 
    254              list_filein=${list_filein}" ${filein}" 
    255          fi 
    256      done 
    257      unset period 
     251        fi 
     252        filein=${dirin}/${period}/${var}_tropflux_${suffix}_1979_2013.nc 
     253        if [ ! -f ${filein} ] 
     254        then 
     255            echo " eee : ${filein} not found" 1>> ${log} 
     256            exit 1 
     257        else 
     258            list_filein=${list_filein}" ${filein}" 
     259        fi 
     260    done 
     261    unset period 
    258262done 
    259263unset period_list 
  • trunk/src/change_time_range.sh

    r202 r203  
    1414# ======== 
    1515# 
    16 # :: 
    17 # 
    18 $ change_time_range.sh [--debug] -b yyyymmddb -e yyyymmdde -d directory 
     16# .. code-block:: bash 
     17# 
     18  change_time_range.sh [--debug] -b yyyymmddb -e yyyymmdde -d directory 
    1919# 
    2020# DESCRIPTION 
     
    5858# ======== 
    5959# 
    60 # To modify files under /usr/lodyc/incas/fplod/tropflux_d/to_be_published/:: 
    61 # 
    62 #  $ change_time_range.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -b 19790101 -e 20130331 
    63 # 
    64 # And look at log file with :: 
    65 # 
    66 #  $ tlogd.sh change_time_range 
     60# To modify files under /usr/lodyc/incas/fplod/tropflux_d/to_be_published/: 
     61# 
     62# .. code-block:: bash 
     63# 
     64#    change_time_range.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -b 19790101 -e 20130331 
     65# 
     66# And look at log file with : 
     67# 
     68# .. code-block:: bash 
     69# 
     70#    tlogd.sh change_time_range 
    6771# 
    6872# TIPS 
     
    105109system=$(uname) 
    106110case "${system}" in 
    107    AIX|IRIX64) 
    108       echo "www : no specific posix checking" 
    109       date_cmd=date 
    110    ;; 
    111    Darwin) 
    112       set -o posix 
    113       date_cmd=gdate 
    114    ;; 
    115    Linux) 
    116       set -o posix 
    117       date_cmd=date 
    118    ;; 
    119    *) 
    120      set -o posix 
    121    ;; 
     111    AIX|IRIX64) 
     112        echo "www : no specific posix checking" 
     113        date_cmd=date 
     114    ;; 
     115    Darwin) 
     116        set -o posix 
     117        date_cmd=gdate 
     118    ;; 
     119    Linux) 
     120        set -o posix 
     121        date_cmd=date 
     122    ;; 
     123    *) 
     124        set -o posix 
     125    ;; 
    122126esac 
    123127unset system 
     
    140144if [ ${#} -lt ${minargcount} ] 
    141145then 
    142    echo "${command} : eee : not enought arguments" 
    143    echo "${usage}" 
    144    exit 1 
     146    echo "${command} : eee : not enought arguments" 
     147    echo "${usage}" 
     148    exit 1 
    145149fi 
    146150# 
    147151while [ ${#} -gt 0 ] 
    148152do 
    149    case ${1} in 
    150       -b) 
    151          yyyymmddb=${2} 
    152          shift 
    153       ;; 
    154       -e) 
    155          yyyymmdde=${2} 
    156          shift 
    157       ;; 
    158       -d) 
    159          dirin=${2} 
    160          shift 
    161       ;; 
    162       --debug) 
    163          debug=1 
    164       ;; 
    165       *) 
    166         # anything else 
    167         echo "${command} : eee : unknown option ${1}" 
    168         echo "${command} : eee : ${usage}" 
    169         exit 1 
    170       ;; 
    171    esac 
    172    # next flag 
    173    shift 
     153    case ${1} in 
     154        -b) 
     155            yyyymmddb=${2} 
     156            shift 
     157        ;; 
     158        -e) 
     159            yyyymmdde=${2} 
     160            shift 
     161        ;; 
     162        -d) 
     163            dirin=${2} 
     164            shift 
     165        ;; 
     166        --debug) 
     167            debug=1 
     168        ;; 
     169        *) 
     170            # anything else 
     171            echo "${command} : eee : unknown option ${1}" 
     172            echo "${command} : eee : ${usage}" 
     173            exit 1 
     174        ;; 
     175    esac 
     176    # next flag 
     177    shift 
    174178done 
    175179# 
     
    177181if [ ! -d ${dirin} ] 
    178182then 
    179    echo " eee : ${dirin} not found" 
    180    exit 1 
     183    echo " eee : ${dirin} not found" 
     184    exit 1 
    181185fi 
    182186# 
     
    184188if [ ! -x ${dirin} ] 
    185189then 
    186    echo " eee : ${dirin} not reachable" 
    187    exit 1 
     190    echo " eee : ${dirin} not reachable" 
     191    exit 1 
    188192fi 
    189193#++ check yyyymmddb and yyyymmddb validity 
     
    194198if [ ${status} -ne 0 ] 
    195199then 
    196    echo "${command} : ${LINENO} : eee : tool ${tool} not found" 
    197    exit 1 
     200    echo "${command} : ${LINENO} : eee : tool ${tool} not found" 
     201    exit 1 
    198202fi 
    199203unset status 
     
    203207if [ "${PROJECT_LOG}" = "" ] 
    204208then 
    205    echo "${command} : ${LINENO} : eee : \${PROJECT_LOG} not defined" 
    206    exit 1 
     209    echo "${command} : ${LINENO} : eee : \${PROJECT_LOG} not defined" 
     210    exit 1 
    207211fi 
    208212# 
     
    210214if [ ! -d ${PROJECT_LOG} ] 
    211215then 
    212    echo "${command} : eee : ${PROJECT_LOG} not found" 
    213    exit 1 
     216    echo "${command} : eee : ${PROJECT_LOG} not found" 
     217    exit 1 
    214218fi 
    215219# 
     
    217221if [ ! -x ${PROJECT_LOG} ] 
    218222then 
    219    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    220    exit 1 
     223    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     224    exit 1 
    221225fi 
    222226# 
     
    224228if [ ! -w ${PROJECT_LOG} ] 
    225229then 
    226    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    227    exit 1 
     230    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     231    exit 1 
    228232fi 
    229233# 
     
    247251period_list="daily monthly" 
    248252list_filein="" 
    249 for var in $varlist 
     253for var in ${varlist} 
    250254do 
    251      for period in ${period_list} 
    252      do 
    253          if [ "${period}" == "daily" ] 
    254          then 
     255    for period in ${period_list} 
     256    do 
     257        if [ "${period}" == "daily" ] 
     258        then 
    255259            suffix=1d 
    256          else 
     260        else 
    257261            suffix=1m 
    258          fi 
    259          filein=${dirin}/${period}/${var}_tropflux_${suffix}_1979_2013.nc 
    260          if [ ! -f ${filein} ] 
    261          then 
    262              echo " eee : ${filein} not found" 1>> ${log} 
    263              exit 1 
    264          else 
    265              list_filein=${list_filein}" ${filein}" 
    266          fi 
    267      done 
    268      unset period 
     262        fi 
     263        filein=${dirin}/${period}/${var}_tropflux_${suffix}_1979_2013.nc 
     264        if [ ! -f ${filein} ] 
     265        then 
     266            echo " eee : ${filein} not found" 1>> ${log} 
     267            exit 1 
     268        else 
     269            list_filein=${list_filein}" ${filein}" 
     270        fi 
     271    done 
     272    unset period 
    269273done 
    270274unset period_list 
     
    290294do 
    291295    echo "iii : change time_range in ${filein}" >> ${log} 2>&1 
    292     period=$(basename $(dirname $filein)) 
     296    period=$(basename $(dirname ${filein})) 
    293297    if [ "${period}" == "daily" ] 
    294298    then 
    295        time_range=${time_ranged} 
     299        time_range=${time_ranged} 
    296300    else 
    297        time_range=${time_rangem} 
     301        time_range=${time_rangem} 
    298302    fi 
    299303    ncatted -O -h -a time_range,global,o,c,"${time_range}" ${filein} >> ${log} 2>&1 
  • trunk/src/compute_erai_daily_region_2d.sh

    r199 r203  
    88# 
    99# =============================== 
    10 # compute_erai_daily_region_2d.sh  
     10# compute_erai_daily_region_2d.sh 
    1111# =============================== 
    1212# 
     
    1414# ======== 
    1515# 
    16 # :: 
    17 # 
    18 $ compute_erai_daily_region_2d.sh [--debug] [--diff_cmd arg] -b yyyymmdd -e yyyymmdd 
     16# .. code-block:: bash 
     17# 
     18  compute_erai_daily_region_2d.sh [--debug] [--diff_cmd arg] -b yyyymmdd -e yyyymmdd 
    1919# 
    2020# DESCRIPTION 
     
    2323# .. option:: --diff_cmd <arg> 
    2424# 
    25 #    By default :samp:`ncflint` command is used to compute difference  
     25#    By default :samp:`ncflint` command is used to compute difference 
    2626#    between NetCDF files 
    2727# 
     
    7777# 
    7878# On climserv only if you don't have any ERA-I reference data, 
    79 # you just have to run this tool :: 
    80 # 
    81 #  $ compute_erai_daily_region_2d.sh -b 19890102 -e 20091231 
    82 # 
    83 # And look at log file with :: 
    84 # 
    85 #  $ tlogd.sh compute_erai_daily_region_2d 
     79# you just have to run this tool : 
     80# 
     81# .. code-block:: bash 
     82# 
     83#    compute_erai_daily_region_2d.sh -b 19890102 -e 20091231 
     84# 
     85# And look at log file with : 
     86# 
     87# .. code-block:: bash 
     88# 
     89#    tlogd.sh compute_erai_daily_region_2d 
    8690# 
    8791# and of course on files in ${PROJECT_ID}. 
     
    117121# catalog 
    118122# 
    119 # improve log  
     123# improve log 
    120124# 
    121125# handle dd parameter : now from 1 to end of month 
     
    137141# same idea for day min and max - some time hard coded with 01 or 31 (avoid yyyy0231 !!) 
    138142# 
    139 # solve this kind of warning:: 
    140 # 
    141 #  ncrcat: WARNING Intra-file non-monotonicity. Record coordinate "time" does not monotonically decrease between (input file /homedata/pinsard/log//compute_erai_daily_region_2d.20110126T154235Z.temp//temp_int_str_199012.nc record indices: 29, 30) (output file /homedata/pinsard/tropflux_d//erai_TROP_1d_19900101_19901231_str_gridOrig.nc record indices 363, 364) record coordinate values -0.000278, -0.000278 
     143# solve this kind of warning: 
     144# 
     145# .. parsed-literal:: 
     146# 
     147#    ncrcat: WARNING Intra-file non-monotonicity. Record coordinate "time" does not monotonically decrease between (input file /homedata/pinsard/log//compute_erai_daily_region_2d.20110126T154235Z.temp//temp_int_str_199012.nc record indices: 29, 30) (output file /homedata/pinsard/tropflux_d//erai_TROP_1d_19900101_19901231_str_gridOrig.nc record indices 363, 364) record coordinate values -0.000278, -0.000278 
    142148# 
    143149#  this seems to be solved by using cdo instead of ncflint. to be confirmed ! 
     
    146152# is it normal ? 
    147153# 
    148 # check units of str :: 
    149 # 
    150 #     str:long_name = "Surface thermal radiation" ; 
    151 #     str:units = "W/m^2 s" 
     154# check units of str : 
     155# 
     156# .. parsed-literal:: 
     157# 
     158#    str:long_name = "Surface thermal radiation" ; 
     159#    str:units = "W/m^2 s" 
    152160# 
    153161# still true after ncflint/cdo arithmetic ? 
     
    222230system=$(uname) 
    223231case "${system}" in 
    224    AIX|IRIX64) 
    225       echo "www : no specific posix checking" 
    226       date_cmd=date 
    227    ;; 
    228    Darwin) 
    229       set -o posix 
    230       date_cmd=gdate 
    231    ;; 
    232    Linux) 
    233       set -o posix 
    234       date_cmd=date 
    235    ;; 
    236    *) 
    237      set -o posix 
    238    ;; 
     232    AIX|IRIX64) 
     233        echo "www : no specific posix checking" 
     234        date_cmd=date 
     235    ;; 
     236    Darwin) 
     237        set -o posix 
     238        date_cmd=gdate 
     239    ;; 
     240    Linux) 
     241        set -o posix 
     242        date_cmd=date 
     243    ;; 
     244    *) 
     245        set -o posix 
     246    ;; 
    239247esac 
    240248unset system 
     
    268276if [ ${#} -lt ${minargcount} ] 
    269277then 
    270    echo "${command} : eee : not enought arguments" 
    271    echo "${usage}" 
    272    exit 1 
     278    echo "${command} : eee : not enought arguments" 
     279    echo "${usage}" 
     280    exit 1 
    273281fi 
    274282# 
    275283while [ ${#} -gt 0 ] 
    276284do 
    277    case ${1} in 
    278       --debug) 
    279          debug=1 
    280       ;; 
    281       --diff_cmd) 
    282          diff_cmd=${2} 
    283          shift 
    284       ;; 
    285       -b) 
    286          # first date to get 
    287          yyyymmddb=${2} 
    288          shift 
    289       ;; 
    290       -e) 
    291          # last date to get 
    292          yyyymmdde=${2} 
    293          shift 
    294       ;; 
    295       *) 
    296         # anything else 
    297         echo "${command} : eee : unknown option ${1}" 
    298         echo "${command} : eee : ${usage}" 
    299         exit 1 
    300       ;; 
    301    esac 
    302    # next flag 
    303    shift 
     285    case ${1} in 
     286        --debug) 
     287            debug=1 
     288        ;; 
     289        --diff_cmd) 
     290            diff_cmd=${2} 
     291            shift 
     292        ;; 
     293        -b) 
     294            # first date to get 
     295            yyyymmddb=${2} 
     296            shift 
     297        ;; 
     298        -e) 
     299            # last date to get 
     300            yyyymmdde=${2} 
     301            shift 
     302        ;; 
     303        *) 
     304            # anything else 
     305            echo "${command} : eee : unknown option ${1}" 
     306            echo "${command} : eee : ${usage}" 
     307            exit 1 
     308        ;; 
     309    esac 
     310    # next flag 
     311    shift 
    304312done 
    305313# 
     
    310318if [ ${status_date} -ne 0 ] 
    311319then 
    312      echo "${command} : eee : yyyymmddb ${yyyymmddb} argument invalid" 
    313      exit 1 
     320    echo "${command} : eee : yyyymmddb ${yyyymmddb} argument invalid" 
     321    exit 1 
    314322fi 
    315323unset status_date 
     
    317325if [[ "${yyyymmddb}" < "${yyyymmddb_min}" ]] 
    318326then 
    319      echo "${command} : eee : yyyymmddb ${yyyymmddb} must be equal or greater than ${yyyymmddb_min}" 
    320      exit 1 
     327    echo "${command} : eee : yyyymmddb ${yyyymmddb} must be equal or greater than ${yyyymmddb_min}" 
     328    exit 1 
    321329fi 
    322330# 
     
    325333if [ ${status_date} -ne 0 ] 
    326334then 
    327      echo "${command} : eee : yyyymmdde ${yyyymmdde} argument invalid" 
    328      exit 1 
     335    echo "${command} : eee : yyyymmdde ${yyyymmdde} argument invalid" 
     336    exit 1 
    329337fi 
    330338unset status_date 
     
    332340if [[ "${yyyymmdde}" > "${yyyymmdde_max}" ]] 
    333341then 
    334      echo "${command} : eee : yyyymmdde ${yyyymmdde} must be lower or equal to ${yyyymmdde_max}" 
    335      exit 1 
    336 fi 
    337 # 
     342    echo "${command} : eee : yyyymmdde ${yyyymmdde} must be lower or equal to ${yyyymmdde_max}" 
     343    exit 1 
     344fi 
    338345# 
    339346if [[ "${yyyymmdde}" < "${yyyymmddb}" ]] 
    340347then 
    341      echo "${command} : eee : yyyymmdde ${yyyymmdde} must be equal or greater than yyyymmddb ${yyyymmddb}" 
    342      exit 1 
    343 fi 
    344 #  
     348    echo "${command} : eee : yyyymmdde ${yyyymmdde} must be equal or greater than yyyymmddb ${yyyymmddb}" 
     349    exit 1 
     350fi 
     351# 
    345352# test if diff_cmd valid 
    346353case ${diff_cmd} in 
    347    ncflint) 
    348       # test if ncflint available 
    349       tool=ncflint 
    350       type ${tool} 1> /dev/null 2>&1 
    351       status=${?} 
    352       if [ ${status} -ne 0 ] 
    353       then 
    354          echo "${command} : eee : ${tool} not found" 
    355          exit 1 
    356       fi 
    357       unset status 
    358    ;; 
    359    cdo) 
    360       # test if cdo available 
    361       tool=cdo 
    362       type ${tool} 1> /dev/null 2>&1 
    363       status=${?} 
    364       if [ ${status} -ne 0 ] 
    365       then 
    366          echo "${command} : eee : ${tool} not found" 
    367          exit 1 
    368       fi 
    369       unset status 
    370    ;; 
    371    *) 
    372       echo "${command} : eee : diff_cmd ${diff_cmd} argument invalid" 
    373       exit 1 
     354    ncflint) 
     355        # test if ncflint available 
     356        tool=ncflint 
     357        type ${tool} 1> /dev/null 2>&1 
     358        status=${?} 
     359        if [ ${status} -ne 0 ] 
     360        then 
     361            echo "${command} : eee : ${tool} not found" 
     362            exit 1 
     363        fi 
     364        unset status 
     365    ;; 
     366    cdo) 
     367        # test if cdo available 
     368        tool=cdo 
     369        type ${tool} 1> /dev/null 2>&1 
     370        status=${?} 
     371        if [ ${status} -ne 0 ] 
     372        then 
     373            echo "${command} : eee : ${tool} not found" 
     374            exit 1 
     375        fi 
     376        unset status 
     377    ;; 
     378    *) 
     379        echo "${command} : eee : diff_cmd ${diff_cmd} argument invalid" 
     380        exit 1 
     381    ;; 
    374382esac 
    375  
     383# 
    376384# check for ${PROJECT_LOG} definition 
    377385if [ "${PROJECT_LOG}" = "" ] 
    378386then 
    379    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    380    exit 1 
     387    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     388    exit 1 
    381389fi 
    382390# 
     
    384392if [ ! -d ${PROJECT_LOG} ] 
    385393then 
    386    echo "${command} : eee : ${PROJECT_LOG} not found" 
    387    exit 1 
     394    echo "${command} : eee : ${PROJECT_LOG} not found" 
     395    exit 1 
    388396fi 
    389397# 
     
    391399if [ ! -x ${PROJECT_LOG} ] 
    392400then 
    393    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    394    exit 1 
     401    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     402    exit 1 
    395403fi 
    396404# 
     
    398406if [ ! -w ${PROJECT_LOG} ] 
    399407then 
    400    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    401    exit 1 
     408    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     409    exit 1 
    402410fi 
    403411# 
     
    434442if [ ! -d ${dirin} ] 
    435443then 
    436    echo "${command} : eee : ${dirin} not found" 
    437    exit 1 
     444    echo "${command} : eee : ${dirin} not found" 
     445    exit 1 
    438446fi 
    439447# 
     
    441449if [ ! -x ${dirin} ] 
    442450then 
    443    echo "${command} : eee : ${dirin} not reachable" 
    444    exit 1 
     451    echo "${command} : eee : ${dirin} not reachable" 
     452    exit 1 
    445453fi 
    446454# 
    447455# str = Surface thermal radiation 
    448 for var in str ; do 
    449    yyyy=${yearmin} 
    450    while [ ${yyyy} -le ${yearmax} ] 
    451    do 
    452       month=${monthmin} 
    453       while [ ${month} -le ${monthmax} ] 
    454       do 
    455          cmonth=$(printf "%2.2d" ${month}) 
    456          daymin=1 
    457          daymax=$(cal ${month} ${yyyy} | grep . | fmt -1 | tail -1) 
    458          day=${daymin} 
    459          while [ ${day} -le ${daymax} ] 
    460          do 
    461             echo "iii : ${yyyy}${cmonth}${day}" 
    462             cday=$(printf "%2.2d" ${day}) 
    463             if [ -f ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}.fshei.GLOBAL_075.nc ] 
     456for var in str 
     457do 
     458    yyyy=${yearmin} 
     459    while [ ${yyyy} -le ${yearmax} ] 
     460    do 
     461        month=${monthmin} 
     462        while [ ${month} -le ${monthmax} ] 
     463        do 
     464            cmonth=$(printf "%2.2d" ${month}) 
     465            daymin=1 
     466            daymax=$(cal ${month} ${yyyy} | grep . | fmt -1 | tail -1) 
     467            day=${daymin} 
     468            while [ ${day} -le ${daymax} ] 
     469            do 
     470                echo "iii : ${yyyy}${cmonth}${day}" 
     471                cday=$(printf "%2.2d" ${day}) 
     472                if [ -f ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}.fshei.GLOBAL_075.nc ] 
     473                then 
     474                    if [ ${debug} -eq 1 ] 
     475                    then 
     476                        ncdump -v time ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}.fshei.GLOBAL_075.nc >> ${log} 2>&1 
     477                    fi 
     478                    ncpdq -U ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}.fshei.GLOBAL_075.nc ${dirtemp}/${var}.${yyyy}${cmonth}${cday}.temp.GLOBAL_075.nc 
     479                    if [ ${debug} -eq 1 ] 
     480                    then 
     481                        ncdump -v time ${dirtemp}/${var}.${yyyy}${cmonth}${cday}.temp.GLOBAL_075.nc >> ${log} 2>&1 
     482                    fi 
     483                else 
     484                    echo "${command} : iii : no files ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}*" >> ${log} 
     485                fi 
     486                day=$(( ${day} + 1 )) 
     487            done 
     488            exist_temp_files=$(find ${dirtemp} -name "${var}.${yyyy}${cmonth}*temp*") 
     489            if [ "${exist_temp_files}" != "" ] 
    464490            then 
    465                if [ ${debug} -eq 1 ] 
    466                then 
    467                   ncdump -v time ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}.fshei.GLOBAL_075.nc >> ${log} 2>&1 
    468                fi 
    469                ncpdq -U ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}.fshei.GLOBAL_075.nc ${dirtemp}/${var}.${yyyy}${cmonth}${cday}.temp.GLOBAL_075.nc 
    470                if [ ${debug} -eq 1 ] 
    471                then 
    472                   ncdump -v time ${dirtemp}/${var}.${yyyy}${cmonth}${cday}.temp.GLOBAL_075.nc >> ${log} 2>&1 
    473                fi 
     491                # concatenation of daily files 
     492                ncrcat -O ${dirtemp}/${var}.${yyyy}${cmonth}??.temp.GLOBAL_075.nc ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc 
     493                if [ ${debug} -eq 1 ] 
     494                then 
     495                    ncdump -v time ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc >> ${log} 2>&1 
     496                fi 
     497                rm ${dirtemp}/${var}.${yyyy}${cmonth}??.temp.GLOBAL_075.nc 2> /dev/null 
     498                ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,0,,5 ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc ${dirtemp}/temp_time0.nc 
     499                if [ ${debug} -eq 1 ] 
     500                then 
     501                    ncdump -v time ${dirtemp}/temp_time0.nc >> ${log} 2>&1 
     502                fi 
     503                ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,4,,5 ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc ${dirtemp}/temp_time4.nc 
     504                if [ ${debug} -eq 1 ] 
     505                then 
     506                    ncdump -v time ${dirtemp}/temp_time4.nc >> ${log} 2>&1 
     507                fi 
     508                case "${diff_cmd}" in 
     509                    ncflint) 
     510                        # différence entre les forcast a 36 et a 12h (pour avoir des flux par jour) et la constante suivant le -w permet de se ramener a des unites connues 
     511                        ncflint -w 1.1574074,-1.1574074 ${dirtemp}/temp_time0.nc ${dirtemp}/temp_time4.nc ${dirtemp}/temp_time.nc 
     512                        if [ ${debug} -eq 1 ] 
     513                        then 
     514                            ncdump -v time ${dirtemp}/temp_time.nc >> ${log} 2>&1 
     515                        fi 
     516                        # La deuxieme permet uniquement de passer en seconde. 1.1574074*.00001=1/86400. (jour a seconde) 
     517                        ncflint -w 0.00001,0.0 ${dirtemp}/temp_time.nc ${dirtemp}/temp_time.nc ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc 
     518                        if [ ${debug} -eq 1 ] 
     519                        then 
     520                            ncdump -v time ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc >> ${log} 2>&1 
     521                        fi 
     522                    ;; 
     523                    cdo) 
     524                        cdo sub ${dirtemp}/temp_time0.nc ${dirtemp}/temp_time4.nc ${dirtemp}/temp_time.nc >> ${log} 2>&1 
     525                        if [ ${debug} -eq 1 ] 
     526                        then 
     527                            ncdump -v time ${dirtemp}/temp_time.nc >> ${log} 2>&1 
     528                        fi 
     529                        cdo divc,86400. ${dirtemp}/temp_time.nc ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc >> ${log} 2>&1 
     530                        if [ ${debug} -eq 1 ] 
     531                        then 
     532                            ncdump -v time ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc >> ${log} 2>&1 
     533                        fi 
     534                    ;; 
     535                esac 
     536                rm ${dirtemp}/temp_time* 2> /dev/null 
     537                rm ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc 2> /dev/null 
    474538            else 
    475                echo "${command} : iii : no files ${dirin}/FC_SF/${yyyy}/${cmonth}/${var}.${yyyy}${cmonth}${cday}*" >> ${log} 
     539                echo "${command} : iii : no files ${dirtemp}/${var}.${yyyy}${cmonth}*temp*" >> ${log} 
    476540            fi 
    477             day=$(( ${day} + 1 )) 
    478          done 
    479          exist_temp_files=$(find ${dirtemp} -name "${var}.${yyyy}${cmonth}*temp*") 
    480          if [ "${exist_temp_files}" != "" ] 
    481          then 
    482             # concatenation of daily files 
    483             ncrcat -O ${dirtemp}/${var}.${yyyy}${cmonth}??.temp.GLOBAL_075.nc ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc 
    484             if [ ${debug} -eq 1 ] 
    485             then 
    486                ncdump -v time ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc >> ${log} 2>&1 
    487             fi 
    488             rm ${dirtemp}/${var}.${yyyy}${cmonth}??.temp.GLOBAL_075.nc 2> /dev/null 
    489             ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,0,,5 ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc ${dirtemp}/temp_time0.nc 
    490             if [ ${debug} -eq 1 ] 
    491             then 
    492                ncdump -v time ${dirtemp}/temp_time0.nc >> ${log} 2>&1 
    493             fi 
    494             ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,4,,5 ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc ${dirtemp}/temp_time4.nc 
    495             if [ ${debug} -eq 1 ] 
    496             then 
    497                ncdump -v time ${dirtemp}/temp_time4.nc >> ${log} 2>&1 
    498             fi 
    499             case "${diff_cmd}" in 
    500                ncflint) 
    501                   # différence entre les forcast a 36 et a 12h (pour avoir des flux par jour) et la constante suivant le -w permet de se ramener a des unites connues 
    502                   ncflint -w 1.1574074,-1.1574074 ${dirtemp}/temp_time0.nc ${dirtemp}/temp_time4.nc ${dirtemp}/temp_time.nc 
    503                   if [ ${debug} -eq 1 ] 
    504                   then 
    505                       ncdump -v time ${dirtemp}/temp_time.nc >> ${log} 2>&1 
    506                   fi 
    507                   # La deuxieme permet uniquement de passer en seconde. 1.1574074*.00001=1/86400. (jour a seconde) 
    508                   ncflint -w 0.00001,0.0 ${dirtemp}/temp_time.nc ${dirtemp}/temp_time.nc ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc 
    509                   if [ ${debug} -eq 1 ] 
    510                   then 
    511                      ncdump -v time ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc >> ${log} 2>&1 
    512                   fi 
    513                ;; 
    514                cdo) 
    515                   cdo sub ${dirtemp}/temp_time0.nc ${dirtemp}/temp_time4.nc ${dirtemp}/temp_time.nc >> ${log} 2>&1 
    516                   if [ ${debug} -eq 1 ] 
    517                   then 
    518                      ncdump -v time ${dirtemp}/temp_time.nc >> ${log} 2>&1 
    519                   fi 
    520                   cdo divc,86400. ${dirtemp}/temp_time.nc ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc >> ${log} 2>&1 
    521                   if [ ${debug} -eq 1 ] 
    522                   then 
    523                      ncdump -v time ${dirtemp}/temp_int_${var}_${yyyy}${cmonth}.nc >> ${log} 2>&1 
    524                   fi 
    525                ;; 
    526             esac 
    527             rm ${dirtemp}/temp_time* 2> /dev/null 
    528             rm ${dirtemp}/${var}.${yyyy}${cmonth}.fshei.GLOBAL_075.nc 2> /dev/null 
    529          else 
    530             echo "${command} : iii : no files ${dirtemp}/${var}.${yyyy}${cmonth}*temp*" >> ${log} 
    531          fi 
    532          unset exist_temp_files 
    533          month=$(( ${month} + 1 )) 
    534       done 
    535       # concatenation of monthly files 
    536       if [ ${debug} -eq 1 ] 
    537       then 
    538          ncdump -v time ${dirtemp}/temp_int_${var}_${yyyy}??.nc 1>> ${log} 2>&1 
    539       fi 
    540       ncrcat -O ${dirtemp}/temp_int_${var}_${yyyy}??.nc ${PROJECT_ID}/erai_${reg}_1d_${yyyy}${cmonthmin}01_${yyyy}${cmonthmax}31_${var}_gridOrig.nc 1>> ${log} 2>&1 
    541       rm ${dirtemp}/temp_int_${var}_${yyyy}* 2> /dev/null 
    542       yyyy=$(( ${yyyy} + 1 )) 
    543    done 
     541            unset exist_temp_files 
     542            month=$(( ${month} + 1 )) 
     543        done 
     544        # concatenation of monthly files 
     545        if [ ${debug} -eq 1 ] 
     546        then 
     547            ncdump -v time ${dirtemp}/temp_int_${var}_${yyyy}??.nc 1>> ${log} 2>&1 
     548        fi 
     549        ncrcat -O ${dirtemp}/temp_int_${var}_${yyyy}??.nc ${PROJECT_ID}/erai_${reg}_1d_${yyyy}${cmonthmin}01_${yyyy}${cmonthmax}31_${var}_gridOrig.nc 1>> ${log} 2>&1 
     550        rm ${dirtemp}/temp_int_${var}_${yyyy}* 2> /dev/null 
     551        yyyy=$(( ${yyyy} + 1 )) 
     552    done 
    544553done 
    545554# 
     
    550559# u10 = 10m U wind component 
    551560# v10 = 10m V wind component 
    552 for var in msl sstk t2 d2 u10 v10 ; do 
    553    yyyy=${yearmin} 
    554    while [ ${yyyy} -le ${yearmax} ] 
    555    do 
    556       month=${monthmin} 
    557       while [ ${month} -le ${monthmax} ] 
    558       do 
    559          cmonth=$(printf "%2.2d" ${month}) 
    560          if [ -f ${dirin}/AN_SF/${yyyy}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ] 
    561          then 
    562             ncpdq -U ${dirin}/AN_SF/${yyyy}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc 
    563             ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,0,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time1.nc 
    564             ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,1,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time2.nc 
    565             ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,2,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time3.nc 
    566             ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,3,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time4.nc 
    567             ncea ${dirtemp}/temp_time* ${dirtemp}/temp_int_${yyyy}${cmonth}.nc 
    568             rm ${dirtemp}/temp_time* 2> /dev/null 
    569             rm ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc 2> /dev/null 
    570             month=$(( ${month} + 1 )) 
    571           else 
    572              echo "${command} : iii : no file ${dirin}/AN_SF/${yyyy}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc " >> ${log} 
    573           fi 
    574       done 
    575       # concatenation of monthly files 
    576       if [ ${debug} -eq 1 ] 
    577       then 
    578          ncdump -v time ${dirtemp}/temp_int_${yyyy}??.nc >> ${log} 2>&1 
    579       fi 
    580       ncrcat -O ${dirtemp}/temp_int_${yyyy}??.nc ${PROJECT_ID}/erai_${reg}_1d_${yyyy}${cmonthmin}01_${yyyy}${cmonthmax}31_${var}_gridOrig.nc >> ${log} 2>&1 
    581       rm ${dirtemp}/temp_int_${yyyy}* 2> /dev/null 
    582       yyyy=$(( ${yyyy} + 1 )) 
    583    done 
     561for var in msl sstk t2 d2 u10 v10 
     562do 
     563    yyyy=${yearmin} 
     564    while [ ${yyyy} -le ${yearmax} ] 
     565    do 
     566        month=${monthmin} 
     567        while [ ${month} -le ${monthmax} ] 
     568        do 
     569            cmonth=$(printf "%2.2d" ${month}) 
     570            if [ -f ${dirin}/AN_SF/${yyyy}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ] 
     571            then 
     572                ncpdq -U ${dirin}/AN_SF/${yyyy}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc 
     573                ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,0,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time1.nc 
     574                ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,1,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time2.nc 
     575                ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,2,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time3.nc 
     576                ncks -d lat,${minlat},${maxlat} -d lon,${minlon},${maxlon} -d time,3,,4 ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc ${dirtemp}/temp_time4.nc 
     577                ncea ${dirtemp}/temp_time* ${dirtemp}/temp_int_${yyyy}${cmonth}.nc 
     578                rm ${dirtemp}/temp_time* 2> /dev/null 
     579                rm ${dirtemp}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc 2> /dev/null 
     580                month=$(( ${month} + 1 )) 
     581            else 
     582                echo "${command} : iii : no file ${dirin}/AN_SF/${yyyy}/${var}.${yyyy}${cmonth}.ashei.GLOBAL_075.nc " >> ${log} 
     583            fi 
     584        done 
     585        # concatenation of monthly files 
     586        if [ ${debug} -eq 1 ] 
     587        then 
     588            ncdump -v time ${dirtemp}/temp_int_${yyyy}??.nc >> ${log} 2>&1 
     589        fi 
     590        ncrcat -O ${dirtemp}/temp_int_${yyyy}??.nc ${PROJECT_ID}/erai_${reg}_1d_${yyyy}${cmonthmin}01_${yyyy}${cmonthmax}31_${var}_gridOrig.nc >> ${log} 2>&1 
     591        rm ${dirtemp}/temp_int_${yyyy}* 2> /dev/null 
     592        yyyy=$(( ${yyyy} + 1 )) 
     593    done 
    584594done 
    585595# debug to check if clean is done 
    586596if [ ${debug} -eq 1 ] 
    587597then 
    588    ls ${dirtemp}/  >> ${log} 2>&1 
     598    ls ${dirtemp}/  >> ${log} 2>&1 
    589599fi 
    590600# end 
  • trunk/src/concat_eraiy.sh

    r199 r203  
    88# 
    99# =============== 
    10 # concat_eraiy.sh  
     10# concat_eraiy.sh 
    1111# =============== 
    1212# 
     
    1414# ======== 
    1515# 
    16 # :: 
    17 # 
    18 $ concat_eraiy.sh [--debug] -b yyyymmdd -e yyyymmdd 
     16# .. code-block:: bash 
     17# 
     18  concat_eraiy.sh [--debug] -b yyyymmdd -e yyyymmdd 
    1919# 
    2020# DESCRIPTION 
     
    2929# .. option:: -e end date <yyyymmdd> 
    3030# 
    31 # Concatane yearly ERA-I files located  
     31# Concatane yearly ERA-I files located 
    3232# in :file:`/net/adonis/usr/adonis/varclim/tropflux_v1/input` 
    3333# in ${PROJECT_ID} 
    3434# 
    35 # Log file is written on  
     35# Log file is written on 
    3636# :file:`${PROJECT_LOG}/concat_eraiy.log.{YYYYMMDDTHHMMSSZ}` 
    3737# 
     
    7474# 
    7575# On cratos only if you don't have any ERA-I data, 
    76 # you just have to run this tool :: 
    77 # 
    78 #  $ concat_eraiy.sh -b 19890102 -e 20091231 
    79 # 
    80 # And look at log file with :: 
    81 # 
    82 #  $ tlogd.sh concat_eraiy 
     76# you just have to run this tool : 
     77# 
     78# .. code-block:: bash 
     79# 
     80#    concat_eraiy.sh -b 19890102 -e 20091231 
     81# 
     82# And look at log file with : 
     83# 
     84# .. code-block:: bash 
     85# 
     86#    tlogd.sh concat_eraiy 
    8387# 
    8488# and of course on files in ${PROJECT_ID}. 
     
    106110# ==== 
    107111# 
    108 # pour l'instant à cause de :: 
    109 # 
    110 #   has attribute "missing_value" but not "_FillValue" 
     112# pour l'instant à cause de : 
     113# 
     114# .. parsed-literal:: 
     115# 
     116#    has attribute "missing_value" but not "_FillValue" 
    111117# 
    112118# ncrcat renvoie systématiquement un status différent de 0 mais il produit 
     
    120126# catalog 
    121127# 
    122 # improve log  
     128# improve log 
    123129# 
    124130# handle dd parameter : now from 1 to end of month 
     
    148154system=$(uname) 
    149155case "${system}" in 
    150    AIX|IRIX64) 
    151       echo "www : no specific posix checking" 
    152       date_cmd=date 
    153    ;; 
    154    Darwin) 
    155       set -o posix 
    156       date_cmd=gdate 
    157    ;; 
    158    Linux) 
    159       set -o posix 
    160       date_cmd=date 
    161    ;; 
    162    *) 
    163      set -o posix 
    164    ;; 
     156    AIX|IRIX64) 
     157        echo "www : no specific posix checking" 
     158        date_cmd=date 
     159    ;; 
     160    Darwin) 
     161        set -o posix 
     162        date_cmd=gdate 
     163    ;; 
     164    Linux) 
     165        set -o posix 
     166        date_cmd=date 
     167    ;; 
     168    *) 
     169        set -o posix 
     170    ;; 
    165171esac 
    166172unset system 
     
    188194if [ ${#} -lt ${minargcount} ] 
    189195then 
    190    echo "${command} : eee : not enought arguments" 
    191    echo "${usage}" 
    192    exit 1 
     196    echo "${command} : eee : not enought arguments" 
     197    echo "${usage}" 
     198    exit 1 
    193199fi 
    194200# 
    195201while [ ${#} -gt 0 ] 
    196202do 
    197    case ${1} in 
    198       --debug) 
    199          debug=1 
    200       ;; 
    201       -b) 
    202          # first date to get 
    203          yyyymmddb=${2} 
    204          shift 
    205       ;; 
    206       -e) 
    207          # last date to get 
    208          yyyymmdde=${2} 
    209          shift 
    210       ;; 
    211       *) 
    212         # anything else 
    213         echo "${command} : eee : unknown option ${1}" 
    214         echo "${command} : eee : ${usage}" 
    215         exit 1 
    216       ;; 
    217    esac 
    218    # next flag 
    219    shift 
     203    case ${1} in 
     204        --debug) 
     205            debug=1 
     206        ;; 
     207        -b) 
     208            # first date to get 
     209            yyyymmddb=${2} 
     210            shift 
     211        ;; 
     212        -e) 
     213            # last date to get 
     214            yyyymmdde=${2} 
     215            shift 
     216        ;; 
     217        *) 
     218            # anything else 
     219            echo "${command} : eee : unknown option ${1}" 
     220            echo "${command} : eee : ${usage}" 
     221            exit 1 
     222        ;; 
     223    esac 
     224    # next flag 
     225    shift 
    220226done 
    221227# 
     
    226232if [ ${status_date} -ne 0 ] 
    227233then 
    228      echo "${command} : eee : yyyymmddb ${yyyymmddb} argument invalid" 
    229      exit 1 
     234    echo "${command} : eee : yyyymmddb ${yyyymmddb} argument invalid" 
     235    exit 1 
    230236fi 
    231237unset status_date 
     
    233239if [[ "${yyyymmddb}" < "${yyyymmddb_min}" ]] 
    234240then 
    235      echo "${command} : eee : yyyymmddb ${yyyymmddb} must be equal or greater than ${yyyymmddb_min}" 
    236      exit 1 
     241    echo "${command} : eee : yyyymmddb ${yyyymmddb} must be equal or greater than ${yyyymmddb_min}" 
     242    exit 1 
    237243fi 
    238244# 
     
    241247if [ ${status_date} -ne 0 ] 
    242248then 
    243      echo "${command} : eee : yyyymmdde ${yyyymmdde} argument invalid" 
    244      exit 1 
     249    echo "${command} : eee : yyyymmdde ${yyyymmdde} argument invalid" 
     250    exit 1 
    245251fi 
    246252unset status_date 
     
    248254if [[ "${yyyymmdde}" > "${yyyymmdde_max}" ]] 
    249255then 
    250      echo "${command} : eee : yyyymmdde ${yyyymmdde} must be lower or equal to ${yyyymmdde_max}" 
    251      exit 1 
    252 fi 
    253 # 
     256    echo "${command} : eee : yyyymmdde ${yyyymmdde} must be lower or equal to ${yyyymmdde_max}" 
     257    exit 1 
     258fi 
    254259# 
    255260if [[ "${yyyymmdde}" < "${yyyymmddb}" ]] 
    256261then 
    257      echo "${command} : eee : yyyymmdde ${yyyymmdde} must be equal or greater than yyyymmddb ${yyyymmddb}" 
    258      exit 1 
    259 fi 
    260 #  
     262    echo "${command} : eee : yyyymmdde ${yyyymmdde} must be equal or greater than yyyymmddb ${yyyymmddb}" 
     263    exit 1 
     264fi 
     265# 
    261266# test if cdo available 
    262267tool=cdo 
     
    265270if [ ${status} -ne 0 ] 
    266271then 
    267    echo "${command} : eee : ${tool} not found" 
    268    exit 1 
     272    echo "${command} : eee : ${tool} not found" 
     273    exit 1 
    269274fi 
    270275unset status 
     
    273278if [ "${PROJECT_LOG}" = "" ] 
    274279then 
    275    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    276    exit 1 
     280    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     281    exit 1 
    277282fi 
    278283# 
     
    280285if [ ! -d ${PROJECT_LOG} ] 
    281286then 
    282    echo "${command} : eee : ${PROJECT_LOG} not found" 
    283    exit 1 
     287    echo "${command} : eee : ${PROJECT_LOG} not found" 
     288    exit 1 
    284289fi 
    285290# 
     
    287292if [ ! -x ${PROJECT_LOG} ] 
    288293then 
    289    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    290    exit 1 
     294    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     295    exit 1 
    291296fi 
    292297# 
     
    294299if [ ! -w ${PROJECT_LOG} ] 
    295300then 
    296    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    297    exit 1 
     301    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     302    exit 1 
    298303fi 
    299304# 
     
    321326if [ ! -d ${dirin} ] 
    322327then 
    323    echo "${command} : eee : ${dirin} not found" 
    324    exit 1 
     328    echo "${command} : eee : ${dirin} not found" 
     329    exit 1 
    325330fi 
    326331# 
     
    328333if [ ! -x ${dirin} ] 
    329334then 
    330    echo "${command} : eee : ${dirin} not reachable" 
    331    exit 1 
     335    echo "${command} : eee : ${dirin} not reachable" 
     336    exit 1 
    332337fi 
    333338# 
     
    335340for var in ${list_var} 
    336341do 
    337    fileout=${PROJECT_ID}/erai_${var}_${yyyymin}_${yyyymax}.nc 
    338    if [ ${yyyymin} -eq ${yyyymax} ] 
    339    then 
    340       list_filein=${dirin}/erai_${var}_${yyyymin}.nc 
    341       cp ${list_filein} ${fileout} 1>> ${log} 2>&1 
    342    else 
    343       list_filein=$(seq -f "${dirin}/erai_${var}_%g.nc" ${yyyymin} ${yyyymax}) 
    344       # concatenation of files 
    345       ncrcat -O -o ${fileout} ${list_filein} 1>> ${log} 2>&1 
    346       status_ncrcat=${?} 
    347       if [ ${status_ncrcat} -ne 0 ] 
    348       then 
    349            echo "${command} : www : pb with ncrcat : ${status_ncrcat} " 2>> ${log} 
    350            #++exit 1 
    351       else 
    352            echo "${command} : iii : ncrcat ok " 1>> ${log} 
    353            echo "${command} : iii : see ${fileout} " 1>> ${log} 
    354       fi 
    355       unset status_ncrcat 
    356    fi 
    357    if [ ${debug} -eq 1 ] 
    358    then 
    359        ncdump -v time ${fileout} >> ${log} 2>&1 
    360        cdo showdate ${fileout} >> ${log} 2>&1 
    361    fi 
    362    unset list_filein 
    363    unset fileout 
     342    fileout=${PROJECT_ID}/erai_${var}_${yyyymin}_${yyyymax}.nc 
     343    if [ ${yyyymin} -eq ${yyyymax} ] 
     344    then 
     345        list_filein=${dirin}/erai_${var}_${yyyymin}.nc 
     346        cp ${list_filein} ${fileout} 1>> ${log} 2>&1 
     347    else 
     348        list_filein=$(seq -f "${dirin}/erai_${var}_%g.nc" ${yyyymin} ${yyyymax}) 
     349        # concatenation of files 
     350        ncrcat -O -o ${fileout} ${list_filein} 1>> ${log} 2>&1 
     351        status_ncrcat=${?} 
     352        if [ ${status_ncrcat} -ne 0 ] 
     353        then 
     354            echo "${command} : www : pb with ncrcat : ${status_ncrcat} " 2>> ${log} 
     355            #++exit 1 
     356        else 
     357            echo "${command} : iii : ncrcat ok " 1>> ${log} 
     358            echo "${command} : iii : see ${fileout} " 1>> ${log} 
     359        fi 
     360        unset status_ncrcat 
     361    fi 
     362    if [ ${debug} -eq 1 ] 
     363    then 
     364        ncdump -v time ${fileout} >> ${log} 2>&1 
     365        cdo showdate ${fileout} >> ${log} 2>&1 
     366    fi 
     367    unset list_filein 
     368    unset fileout 
    364369done 
    365370unset var 
  • trunk/src/cor30a.pro

    r181 r203  
    4444; ======== 
    4545; 
    46 ; :: 
     46; .. parsed-literal:: 
    4747; 
    4848;                  u  us  ts  ta   qs   qa   Qsw IRd   r  pbl  Ps   zu   zt  zq lat 
     
    5050;    x=cor30a(5.5,0,28.7,27.2,24.2,18.5,141.,419.,0.,600.,1010.,15.,15.,15.,0.,1,1,5.,1.) 
    5151; 
    52 ; Result with these sample values with Matlab code:: 
     52; Result with these sample values with Matlab code: 
     53; 
     54; .. parsed-literal:: 
    5355; 
    5456;      8.64830      101.640    0.0352910  2.17780e-05  0.000115000  0.000115000 
     
    5759;  0.000941350   0.00107910   0.00107910     0.780060 
    5860; 
    59 ; Result obtained with this idl routine:: 
    60 ; 
     61; Result obtained with this idl routine: 
     62; 
     63; .. parsed-literal:: 
     64 
    6165;      8.64829      101.640    0.0352913  2.17780e-05  0.000115000  0.000115000 
    6266;     -29.5802     0.175432   -0.0423667 -0.000205610     0.250948  0.000351304 
     
    223227  hlb=-rhoa*LLe*usr*qsr 
    224228  qout=Rnl+hsb+hlb 
    225   dels=Rns*(.065+11*tkt-6.6e-5/tkt*(1-exp(-tkt/8.0e-4)))        ; Eq.16 Shortwave 
     229  dels=Rns*(.065+11*tkt-6.6e-5/tkt*(1-exp(-tkt/8.0e-4)))      ; Eq.16 Shortwave 
    226230  qcol=qout-dels 
    227   alq=Al*qcol+be*hlb*cpw/LLe                                    ; Eq. 7 Buoy flux water 
     231  alq=Al*qcol+be*hlb*cpw/LLe                     ; Eq. 7 Buoy flux water 
    228232 
    229233;  if (alq gt 0) then begin 
    230 ;    xlamx=6./(1+(bigc*alq/usr^4)^.75)^.333                     ; Eq 13 Saunders 
    231 ;    tkt=xlamx*visw/(sqrt(rhoa/rhow)*usr)                       ;Eq.11 Sub. thk 
     234;    xlamx=6./(1+(bigc*alq/usr^4)^.75)^.333             ; Eq 13 Saunders 
     235;    tkt=xlamx*visw/(sqrt(rhoa/rhow)*usr)             ;Eq.11 Sub. thk 
    232236;  endif else begin 
    233237;    xlamx=6.0 
    234 ;  tkt=min([.01,xlamx*visw/(sqrt(rhoa/rhow)*usr)])              ;Eq.11 Sub. thk 
     238;  tkt=min([.01,xlamx*visw/(sqrt(rhoa/rhow)*usr)])         ;Eq.11 Sub. thk 
    235239;    tkt=(xlamx*visw/(sqrt(rhoa/rhow)*usr) < .01) 
    236240; 
     
    253257 
    254258;****************   rain heat flux ******** 
    255 dwat=2.11e-5*((t+tdk)/tdk)^1.94                         ;! water vapour diffusivity 
    256 dtmp=(1.+3.309e-3*t-1.44e-6*t*t)*0.02411/(rhoa*cpa)     ;!heat diffusivity 
    257 alfac= 1/(1+(wetc*LLe*dwat)/(cpa*dtmp))                 ;! wet bulb factor 
     259dwat=2.11e-5*((t+tdk)/tdk)^1.94             ;! water vapour diffusivity 
     260dtmp=(1.+3.309e-3*t-1.44e-6*t*t)*0.02411/(rhoa*cpa)      ;!heat diffusivity 
     261alfac= 1/(1+(wetc*LLe*dwat)/(cpa*dtmp))               ;! wet bulb factor 
    258262RF= rain*alfac*cpw*((ts-t-dter*jcool)+(Qs-Q-dqer*jcool)*LLe/cpa)/3600. 
    259263 
     
    262266 
    263267;****************   Webb et al. correection  ************ 
    264 ;wbar=1.61*hlb/LLe/(1+1.61*Q)/rhoa+hsb/rhoa/cpa/ta      ;formulation in hlb already includes webb 
     268;wbar=1.61*hlb/LLe/(1+1.61*Q)/rhoa+hsb/rhoa/cpa/ta     ;formulation in hlb already includes webb 
    265269;hl_webb=rhoa*wbar*Q*LLe 
    266270;**************   compute transfer coeffs relative to ut @meas. ht ********** 
  • trunk/src/correct_terminology.sh

    r202 r203  
    1414# ======== 
    1515# 
    16 # :: 
    17 # 
    18 $ correct_terminology.sh [--debug] -good goodend -bad badend -d directory 
     16# .. code-block:: bash 
     17# 
     18  correct_terminology.sh [--debug] -good goodend -bad badend -d directory 
    1919# 
    2020# DESCRIPTION 
     
    5959# 
    6060# To modify files under /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ because files are not named 
    61 # :file:`var_tropflux_1d_${yyyy}_{yyyy}.nc` but :file:`var_tropflux_1d_{yyyy}_{month}{yyyy}.nc`:: 
    62 # 
    63 #  $ correct_terminology.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -good "1979_2013" -bad "1979_march2013" 
    64 # 
    65 # And look at log file with :: 
    66 # 
    67 #  $ tlogd.sh correct_terminology 
     61# :file:`var_tropflux_1d_${yyyy}_{yyyy}.nc` but :file:`var_tropflux_1d_{yyyy}_{month}{yyyy}.nc`: 
     62# 
     63# .. code-block:: bash 
     64# 
     65#    correct_terminology.sh -d /usr/lodyc/incas/fplod/tropflux_d/to_be_published/ -good "1979_2013" -bad "1979_march2013" 
     66# 
     67# And look at log file with : 
     68# 
     69# .. code-block:: bash 
     70# 
     71#    tlogd.sh correct_terminology 
    6872# 
    6973# SEE ALSO 
     
    99103system=$(uname) 
    100104case "${system}" in 
    101    AIX|IRIX64) 
    102       echo "www : no specific posix checking" 
    103       date_cmd=date 
    104    ;; 
    105    Darwin) 
    106       set -o posix 
    107       date_cmd=gdate 
    108    ;; 
    109    Linux) 
    110       set -o posix 
    111       date_cmd=date 
    112    ;; 
    113    *) 
    114      set -o posix 
    115    ;; 
     105    AIX|IRIX64) 
     106        echo "www : no specific posix checking" 
     107        date_cmd=date 
     108    ;; 
     109    Darwin) 
     110        set -o posix 
     111        date_cmd=gdate 
     112    ;; 
     113    Linux) 
     114        set -o posix 
     115        date_cmd=date 
     116    ;; 
     117    *) 
     118        set -o posix 
     119    ;; 
    116120esac 
    117121unset system 
     
    134138if [ ${#} -lt ${minargcount} ] 
    135139then 
    136    echo "${command} : eee : not enought arguments" 
    137    echo "${usage}" 
    138    exit 1 
     140    echo "${command} : eee : not enought arguments" 
     141    echo "${usage}" 
     142    exit 1 
    139143fi 
    140144# 
    141145while [ ${#} -gt 0 ] 
    142146do 
    143    case ${1} in 
    144       -good) 
    145          goodend=${2} 
    146          shift 
    147       ;; 
    148       -bad) 
    149          badend=${2} 
    150          shift 
    151       ;; 
    152       -d) 
    153          dirin=${2} 
    154          shift 
    155       ;; 
    156       --debug) 
    157          debug=1 
    158       ;; 
    159       *) 
    160         # anything else 
    161         echo "${command} : eee : unknown option ${1}" 
    162         echo "${command} : eee : ${usage}" 
    163         exit 1 
    164       ;; 
    165    esac 
    166    # next flag 
    167    shift 
     147    case ${1} in 
     148        -good) 
     149            goodend=${2} 
     150            shift 
     151        ;; 
     152        -bad) 
     153            badend=${2} 
     154            shift 
     155        ;; 
     156        -d) 
     157            dirin=${2} 
     158            shift 
     159        ;; 
     160        --debug) 
     161            debug=1 
     162        ;; 
     163        *) 
     164            # anything else 
     165            echo "${command} : eee : unknown option ${1}" 
     166            echo "${command} : eee : ${usage}" 
     167            exit 1 
     168        ;; 
     169    esac 
     170    # next flag 
     171    shift 
    168172done 
    169173# 
     
    171175if [ ! -d ${dirin} ] 
    172176then 
    173    echo " eee : ${dirin} not found" 
    174    exit 1 
     177    echo " eee : ${dirin} not found" 
     178    exit 1 
    175179fi 
    176180# 
     
    178182if [ ! -x ${dirin} ] 
    179183then 
    180    echo " eee : ${dirin} not reachable" 
    181    exit 1 
     184    echo " eee : ${dirin} not reachable" 
     185    exit 1 
    182186fi 
    183187#++ check good validity 
     
    186190if [ "${PROJECT_LOG}" = "" ] 
    187191then 
    188    echo "${command} : ${LINENO} : eee : \${PROJECT_LOG} not defined" 
    189    exit 1 
     192    echo "${command} : ${LINENO} : eee : \${PROJECT_LOG} not defined" 
     193    exit 1 
    190194fi 
    191195# 
     
    193197if [ ! -d ${PROJECT_LOG} ] 
    194198then 
    195    echo "${command} : eee : ${PROJECT_LOG} not found" 
    196    exit 1 
     199    echo "${command} : eee : ${PROJECT_LOG} not found" 
     200    exit 1 
    197201fi 
    198202# 
     
    200204if [ ! -x ${PROJECT_LOG} ] 
    201205then 
    202    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    203    exit 1 
     206    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     207    exit 1 
    204208fi 
    205209# 
     
    207211if [ ! -w ${PROJECT_LOG} ] 
    208212then 
    209    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    210    exit 1 
     213    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     214    exit 1 
    211215fi 
    212216# 
     
    230234period_list="daily monthly" 
    231235list_filein="" 
    232 for var in $varlist 
     236for var in ${varlist} 
    233237do 
    234      for period in ${period_list} 
    235      do 
    236          if [ "${period}" == "daily" ] 
    237          then 
     238    for period in ${period_list} 
     239    do 
     240        if [ "${period}" == "daily" ] 
     241        then 
    238242            suffix=1d 
    239          else 
     243        else 
    240244            suffix=1m 
    241          fi 
    242          filein=${dirin}/${period}/${var}_tropflux_${suffix}_${badend}.nc 
    243          if [ ! -f ${filein} ] 
    244          then 
    245              echo " eee : ${filein} not found" 1>> ${log} 
    246              exit 1 
    247          else 
    248              list_filein=${list_filein}" ${filein}" 
    249          fi 
    250      done 
    251      unset period 
     245        fi 
     246        filein=${dirin}/${period}/${var}_tropflux_${suffix}_${badend}.nc 
     247        if [ ! -f ${filein} ] 
     248        then 
     249            echo " eee : ${filein} not found" 1>> ${log} 
     250            exit 1 
     251        else 
     252            list_filein=${list_filein}" ${filein}" 
     253        fi 
     254    done 
     255    unset period 
    252256done 
    253257unset period_list 
  • trunk/src/cronin_gustiness_ncdf.pro

    r180 r203  
    4444; ======== 
    4545; 
    46 ; :: 
    47 ; 
    48 yyyymmddb = 20000101L 
    49 yyyymmdde = 20001231L 
    50 result = cronin_gustiness_ncdf(yyyymmddb, yyyymmdde) 
    51 print, result 
     46; .. code-block:: idl 
     47; 
     48  yyyymmddb = 20000101L 
     49  yyyymmdde = 20001231L 
     50  result = cronin_gustiness_ncdf(yyyymmddb, yyyymmdde) 
     51  print, result 
    5252; 
    5353; SEE ALSO 
     
    117117;- 
    118118function cronin_gustiness_ncdf $ 
    119          , yyyymmddb $ 
    120          , yyyymmdde 
     119, yyyymmddb $ 
     120, yyyymmdde 
    121121; 
    122122;++ compile_opt idl2, strictarrsubs, logical_predicate 
  • trunk/src/d2m_to_q2m_erai.pro

    r180 r203  
    9494; ======== 
    9595; 
    96 ; :: 
    97 ; 
    98 yyyymmddb = 20000101L 
    99 yyyymmdde = 20001231L 
    100 result = d2m_to_q2m_erai(yyyymmddb, yyyymmdde) 
    101 print, result 
     96; .. code-block:: idl 
     97; 
     98  yyyymmddb = 20000101L 
     99  yyyymmdde = 20001231L 
     100  result = d2m_to_q2m_erai(yyyymmddb, yyyymmdde) 
     101  print, result 
    102102; 
    103103; TODO 
    104104; ==== 
    105105; 
    106 ; fix time pb:: 
    107 ; 
    108 ;   % the time axis has no date before date 2: 20000302 
    109 ;   d2m first date 29811221 
    110 ;   d2m last date 29851224 
     106; fix time pb: 
     107; 
     108; .. parsed-literal:: 
     109; 
     110;    % the time axis has no date before date 2: 20000302 
     111;    d2m first date 29811221 
     112;    d2m last date 29851224 
    111113; 
    112114; compare time between d2m and t2m and msl after reading 
    113115; 
    114 ; pb on cratos idl7 even if output file is written:: 
    115 ; 
    116 ;   % Program caused arithmetic error: Floating overflow 
    117 ;   % Program caused arithmetic error: Floating illegal operand 
     116; pb on cratos idl7 even if output file is written: 
     117; 
     118; .. parsed-literal:: 
     119; 
     120;    % Program caused arithmetic error: Floating overflow 
     121;    % Program caused arithmetic error: Floating illegal operand 
    118122; 
    119123; related to occurence of NaNf in ncdump output ? do no yet 
     
    175179;- 
    176180function d2m_to_q2m_erai $ 
    177          , yyyymmddb $ 
    178          , yyyymmdde 
     181, yyyymmddb $ 
     182, yyyymmdde 
    179183; 
    180184compile_opt idl2, strictarrsubs, logical_predicate 
  • trunk/src/dew_temp_airt_rel_humidity_jv.pro

    r181 r203  
    1616; ======== 
    1717; 
    18 ; :: 
     18; .. code-block:: idl 
    1919; 
    2020;    t = +todo+ 
  • trunk/src/ecmwf.py

    r180 r203  
    4848                  '_version' : self.version} 
    4949        params.update(args) 
    50              
     50 
    5151        data = urllib.urlencode(params) 
    5252        req = urllib2.Request(self.portal, data) 
     
    7272        print 
    7373 
    74          
    7574    def retrieve(self,args): 
    7675        self.put("ECMWF data server batch tool version",self.version); 
     
    8685            text = r['status'] + '.' 
    8786            if 'info' in r and r['info'] != None: 
    88                 text = text + ' ' + r['info']  
     87                text = text + ' ' + r['info'] 
    8988 
    9089            if text != last: 
     
    113112 
    114113        self._call('delete',{'request':rid}) 
    115          
     114 
    116115        if r['status'] == 'aborted': 
    117116            raise RuntimeError("Request aborted") 
    118          
     117 
    119118    def _transfer(self,url,path): 
    120119        result =  urllib.urlretrieve(url,path) 
    121120        return long(result[1]['content-length']) 
    122          
    123     def _bytename(self,size):    
     121 
     122    def _bytename(self,size): 
    124123        next = {'':'K','K':'M','M':'G','G':'T','T':'P'} 
    125124        l    = '' 
  • trunk/src/flux_evaluation_tpr_map.pro

    r180 r203  
    2323; 
    2424; uncomment var 
    25 ;  
     25; 
    2626; coding rules 
    2727; 
     
    2929; ======== 
    3030; 
    31 ; :: 
    32 ; 
    33 ;   date1 = 20000101L 
    34 ;   date2 = 20091231L 
    35 ;   flux_evaluation_tpr_map, date1, date2 
     31; .. code-block:: idl 
     32; 
     33;    date1 = 20000101L 
     34;    date2 = 20091231L 
     35;    flux_evaluation_tpr_map, date1, date2 
    3636; 
    3737; EVOLUTIONS 
     
    114114 
    115115plt, msk,realcont=2,/nocont,/nofill,xminor=1,yminor=1,lct=64,cor_mi, cor_ma,int=cor_int, $ 
    116    title='1) Correlation ', subtitle='', small=[1,4,1],/rempl,marge=marge1 
    117  
    118 NN=n_elements(lat) 
    119  
    120 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 
    121  
    122 for n=0,NN-1 do begin 
    123   x=lon(n) 
    124   y=lat(n) 
    125   c=cor(n) 
    126   cmi=cor_mi & cma=cor_ma & dc=cma-cmi 
    127   col=((10+244*(c-cmi)/dc) > 10) < 254 
    128   plots, x,y,psym=8,symsize=1.5,color=col 
    129 endfor 
    130  
    131 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 
    132  
    133 for n=0,NN-1 do begin 
    134   x=lon(n) 
    135   y=lat(n) 
    136   c=cor(n) 
    137   plots, x,y,psym=8,symsize=1.5,color=0 
     116title='1) Correlation ', subtitle='', small=[1,4,1],/rempl,marge=marge1 
     117 
     118NN=n_elements(lat) 
     119 
     120usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 
     121 
     122for n=0,NN-1 do begin 
     123    x=lon(n) 
     124    y=lat(n) 
     125    c=cor(n) 
     126    cmi=cor_mi & cma=cor_ma & dc=cma-cmi 
     127    col=((10+244*(c-cmi)/dc) > 10) < 254 
     128    plots, x,y,psym=8,symsize=1.5,color=col 
     129endfor 
     130 
     131usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 
     132 
     133for n=0,NN-1 do begin 
     134    x=lon(n) 
     135    y=lat(n) 
     136    c=cor(n) 
     137    plots, x,y,psym=8,symsize=1.5,color=0 
    138138endfor 
    139139 
    140140plt,msk,realcont=2,/nocont,/nofill,xminor=1,yminor=1,lct=64,bias_mi, bias_ma, int=bias_int,/noer, marge=marge1, $ 
    141    title='2) Mean bias', subtitle='', small=[1,4,2],/rempl 
    142  
    143 NN=n_elements(lat) 
    144  
    145 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 
    146  
    147 for n=0,NN-1 do begin 
    148   x=lon(n) 
    149   y=lat(n) 
    150   c=bias(n) 
    151   cmi=bias_mi & cma=bias_ma & dc=cma-cmi 
    152   col=((10+244*(c-cmi)/dc) > 10) < 254 
    153   plots, x,y,psym=8,symsize=1.5,color=col 
    154 endfor 
    155  
    156 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 
    157  
    158 for n=0,NN-1 do begin 
    159   x=lon(n) 
    160   y=lat(n) 
    161   c=bias(n) 
    162   plots, x,y,psym=8,symsize=1.5,color=0 
     141title='2) Mean bias', subtitle='', small=[1,4,2],/rempl 
     142 
     143NN=n_elements(lat) 
     144 
     145usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 
     146 
     147for n=0,NN-1 do begin 
     148    x=lon(n) 
     149    y=lat(n) 
     150    c=bias(n) 
     151    cmi=bias_mi & cma=bias_ma & dc=cma-cmi 
     152    col=((10+244*(c-cmi)/dc) > 10) < 254 
     153    plots, x,y,psym=8,symsize=1.5,color=col 
     154endfor 
     155 
     156usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 
     157 
     158for n=0,NN-1 do begin 
     159    x=lon(n) 
     160    y=lat(n) 
     161    c=bias(n) 
     162    plots, x,y,psym=8,symsize=1.5,color=0 
    163163endfor 
    164164plt,msk,realcont=2,/nocont,/nofill,xminor=1,yminor=1,lct=64,rmsd_mi, rmsd_ma, int=rmsd_int,/noer, $ 
    165    title='3) RMSD ', subtitle='', small=[1,4,3],/rempl, marge=marge1 
    166  
    167 NN=n_elements(lat) 
    168  
    169 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 
    170  
    171 for n=0,NN-1 do begin 
    172   x=lon(n) 
    173   y=lat(n) 
    174   c=rmsd(n) 
    175   cmi=rmsd_mi & cma=rmsd_ma & dc=cma-cmi 
    176   col=((10+244*(c-cmi)/dc) > 10) < 254 
    177   plots, x,y,psym=8,symsize=1.5,color=col 
    178 endfor 
    179  
    180 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 
    181 for n=0,NN-1 do begin 
    182   x=lon(n) 
    183   y=lat(n) 
    184   c=rmsd(n) 
    185   plots, x,y,psym=8,symsize=1.5,color=0 
     165title='3) RMSD ', subtitle='', small=[1,4,3],/rempl, marge=marge1 
     166 
     167NN=n_elements(lat) 
     168 
     169usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 
     170 
     171for n=0,NN-1 do begin 
     172    x=lon(n) 
     173    y=lat(n) 
     174    c=rmsd(n) 
     175    cmi=rmsd_mi & cma=rmsd_ma & dc=cma-cmi 
     176    col=((10+244*(c-cmi)/dc) > 10) < 254 
     177    plots, x,y,psym=8,symsize=1.5,color=col 
     178endfor 
     179 
     180usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 
     181for n=0,NN-1 do begin 
     182    x=lon(n) 
     183    y=lat(n) 
     184    c=rmsd(n) 
     185    plots, x,y,psym=8,symsize=1.5,color=0 
    186186endfor 
    187187plt,msk,realcont=2,/nocont,/nofill,xminor=1,yminor=1,lct=64,std_mi, std_ma, int=std_int,/noer, $ 
    188    title='4) STD ratio', subtitle='', small=[1,4,4],/rempl, marge=marge1 
    189  
    190 NN=n_elements(lat) 
    191  
    192 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 
    193  
    194 for n=0,NN-1 do begin 
    195   x=lon(n) 
    196   y=lat(n) 
    197   c=std(n) 
    198   cmi=std_mi & cma=std_ma & dc=cma-cmi 
    199   col=((10+244*(c-cmi)/dc) > 10) < 254 
    200   plots, x,y,psym=8,symsize=1.5,color=col 
    201 endfor 
    202  
    203 usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 
    204  
    205 for n=0,NN-1 do begin 
    206   x=lon(n) 
    207   y=lat(n) 
    208   c=std(n) 
    209   plots, x,y,psym=8,symsize=1.5,color=0 
     188title='4) STD ratio', subtitle='', small=[1,4,4],/rempl, marge=marge1 
     189 
     190NN=n_elements(lat) 
     191 
     192usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5],/fill 
     193 
     194for n=0,NN-1 do begin 
     195    x=lon(n) 
     196    y=lat(n) 
     197    c=std(n) 
     198    cmi=std_mi & cma=std_ma & dc=cma-cmi 
     199    col=((10+244*(c-cmi)/dc) > 10) < 254 
     200    plots, x,y,psym=8,symsize=1.5,color=col 
     201endfor 
     202 
     203usersym, [-.5,.5,.5,-.5,-.5],[-.5,-.5,.5,.5,-.5] 
     204 
     205for n=0,NN-1 do begin 
     206    x=lon(n) 
     207    y=lat(n) 
     208    c=std(n) 
     209    plots, x,y,psym=8,symsize=1.5,color=0 
    210210endfor 
    211211 
     
    218218pdf=fltarr(nx,ny) 
    219219for i=0, nx-2 do begin 
    220   for j=0,ny-2 do begin 
    221     xmi=xx(i) & xma=xx(i+1) 
    222     ymi=yy(j) & yma=yy(j+1) 
    223     ind=where((x ge xmi) and (x le xma) and (y ge ymi) and (y le yma)) 
    224     pdf(i,j)=float(n_elements(ind)) 
    225 ;    print, xmi,xma,ymi,yma,n_elements(ind) 
    226   endfor 
     220    for j=0,ny-2 do begin 
     221        xmi=xx(i) & xma=xx(i+1) 
     222        ymi=yy(j) & yma=yy(j+1) 
     223        ind=where((x ge xmi) and (x le xma) and (y ge ymi) and (y le yma)) 
     224        pdf(i,j)=float(n_elements(ind)) 
     225        ;    print, xmi,xma,ymi,yma,n_elements(ind) 
     226    endfor 
    227227endfor 
    228228 
    229229scontour, pdf,xx,yy ,small=[2,1,1],/noer, charsize=1, nlevels=30,/fill, $ 
    230      xtitle='TAO Flux', ytitle='Product', title='PDF' 
     230xtitle='TAO Flux', ytitle='Product', title='PDF' 
    231231xyouts, 0, -150, cstat, charsize=1.2 
    232232 
  • trunk/src/flux_evaluation_tpr_timeseries.pro

    r180 r203  
    2525; ======== 
    2626; 
    27 ; :: 
     27; .. code-block:: idl 
    2828; 
    29 ;   date1 = 20000101L 
    30 ;   date2 = 20091231L 
    31 ;   flux_evaluation_tpr_timeseries, date1, date2 
     29;    date1 = 20000101L 
     30;    date2 = 20091231L 
     31;    flux_evaluation_tpr_timeseries, date1, date2 
    3232; 
    3333; EVOLUTIONS 
     
    131131 
    132132 
    133            extract_tpr_location,var,box, $ 
    134                 var_tpr 
    135            var_tpr=reform(var_tpr) 
     133       extract_tpr_location,var,box, $ 
     134       var_tpr 
     135       var_tpr=reform(var_tpr) 
    136136 
    137            stats_5d, tpr,var_tpr, $  ;; tpr=TPR observation and var_tpr=gridded product extracted at TPR location 
    138               cor, bias, std, rmsd 
     137       stats_5d, tpr,var_tpr, $  ;; tpr=TPR observation and var_tpr=gridded product extracted at TPR location 
     138       cor, bias, std, rmsd 
    139139 
    140            printf, 1, x, y, cor, bias, std, rmsd, format='(f6.2, 3x, f6.2, 3x, f4.2, 3x, f7.2, 3x, f4.2, 3x, f5.2)' 
    141            cstat=string(cor, bias, std, rmsd, format='(f4.2,3x,f7.2,3x,f4.2,3x,f5.2)') 
    142            print, cstat 
     140       printf, 1, x, y, cor, bias, std, rmsd, format='(f6.2, 3x, f6.2, 3x, f4.2, 3x, f7.2, 3x, f4.2, 3x, f5.2)' 
     141       cstat=string(cor, bias, std, rmsd, format='(f4.2,3x,f7.2,3x,f4.2,3x,f5.2)') 
     142       print, cstat 
    143143 
    144 ;;         PLOTTING THE TIME-SERIES 
    145            array=[tpr, var_tpr] & mi=min(array,/nan) & ma=max(array,/nan) & int=(ma-mi)/3. 
    146            pltt, ts_smooth(tpr,5,/nan), "t",/rempl, small=[1,3,1], lct=65, $ 
    147                  title='Five day stats are shown below.  TPR (black) and Product (red) at'+csite+' ', charsize=1., $ 
    148                  subtitle=cstat 
    149            ind=where(finite(tpr,/nan)) & var_tpr(ind)=!Values.f_nan 
    150            pltt, ts_smooth(var_tpr,5,/nan), "t",/ov1d, color=250 
    151            erase 
    152            mooring=[mooring,tpr] & product=[product,var_tpr] 
     144;;     PLOTTING THE TIME-SERIES 
     145       array=[tpr, var_tpr] & mi=min(array,/nan) & ma=max(array,/nan) & int=(ma-mi)/3. 
     146       pltt, ts_smooth(tpr,5,/nan), "t",/rempl, small=[1,3,1], lct=65, $ 
     147       title='Five day stats are shown below.  TPR (black) and Product (red) at'+csite+' ', charsize=1., $ 
     148       subtitle=cstat 
     149       ind=where(finite(tpr,/nan)) & var_tpr(ind)=!Values.f_nan 
     150       pltt, ts_smooth(var_tpr,5,/nan), "t",/ov1d, color=250 
     151       erase 
     152       mooring=[mooring,tpr] & product=[product,var_tpr] 
    153153    endif 
    154154endfor 
  • trunk/src/get_erai.py

    r176 r203  
    1515======== 
    1616 
    17 :: 
    18  
    19  $ get_erai.py --begin yyyymmdd --end yyyymmdd 
     17.. code-block:: bash 
     18 
     19   get_erai.py --begin yyyymmdd --end yyyymmdd 
    2020 
    2121EXAMPLES 
    2222======== 
    2323 
    24 :: 
    25  
    26  $ get_erai.py --verbose --begin 20010101 --end 20010330 
     24.. code-block:: bash 
     25 
     26   get_erai.py --verbose --begin 20010101 --end 20010330 
    2727 
    2828SEE ALSO 
     
    4747==== 
    4848 
    49 To convet a GRIB file to a NetCDF file :: 
    50  
    51   $ cdo -f nc copy data.grib data.nc 
     49To convet a GRIB file to a NetCDF file : 
     50 
     51.. code-block:: bash 
     52 
     53   cdo -f nc copy data.grib data.nc 
    5254 
    5355TODO 
  • trunk/src/get_oaflux.sh

    r188 r203  
    1313# ======== 
    1414# 
    15 # :: 
    16 # 
    17 $ get_oaflux.sh 
     15# .. code-block:: bash 
     16# 
     17  get_oaflux.sh 
    1818# 
    1919# DESCRIPTION 
     
    2525# 
    2626# Log file is written on :file:`${PROJECT_LOG}/get_oaflux.log.{YYYYMMDDTHHMMSSZ}` 
    27 # 
    2827# 
    2928#     .. graphviz:: 
     
    5554# 
    5655# If you are working on LOCEAN machine and you don't have any reference data, 
    57 # you just have to run this tool :: 
    58 # 
    59 #  $ get_oaflux.sh 
    60 # 
    61 # And look at log file with :: 
    62 # 
    63 #  $ tlogd.sh get_oaflux 
     56# you just have to run this tool : 
     57# 
     58# .. code-block:: bash 
     59# 
     60#    get_oaflux.sh 
     61# 
     62# And look at log file with : 
     63# 
     64# .. code-block:: bash 
     65# 
     66#    tlogd.sh get_oaflux 
    6467# 
    6568# and of course on files in ${PROJECT_ID}. 
     
    6871# ==== 
    6972# 
    70 # get ftp://ftp.whoi.edu/pub/science/oaflux/data_v3/daily/radiation_1985-2007/sw_isccp_yyyy.nc.gz and generate $PROJECT_ID/swr_oafluxgrid_1985_2007.nc somewhere else 
     73# get ftp://ftp.whoi.edu/pub/science/oaflux/data_v3/daily/radiation_1985-2007/sw_isccp_yyyy.nc.gz and generate ${PROJECT_ID}/swr_oafluxgrid_1985_2007.nc somewhere else 
    7174# 
    7275# SEE ALSO 
     
    9396system=$(uname) 
    9497case "${system}" in 
    95    AIX|IRIX64) 
    96       echo "www : no specific posix checking" 
    97    ;; 
    98    *) 
    99      set -o posix 
    100    ;; 
     98    AIX|IRIX64) 
     99        echo "www : no specific posix checking" 
     100    ;; 
     101    *) 
     102        set -o posix 
     103    ;; 
    101104esac 
    102105unset system 
     
    122125if [ ${status} -ne 0 ] 
    123126then 
    124    echo "${command} : eee : tool ${tool} not found" 
    125    exit 1 
     127    echo "${command} : eee : tool ${tool} not found" 
     128    exit 1 
    126129fi 
    127130unset status 
     
    134137if [ ${status} -ne 0 ] 
    135138then 
    136    echo "${command} : eee : tool ${tool} not found" 
    137    exit 1 
     139    echo "${command} : eee : tool ${tool} not found" 
     140    exit 1 
    138141fi 
    139142unset status 
     
    143146if [ "${PROJECT_LOG}" = "" ] 
    144147then 
    145    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    146    exit 1 
     148    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     149    exit 1 
    147150fi 
    148151# 
     
    150153if [ ! -d ${PROJECT_LOG} ] 
    151154then 
    152    echo "${command} : eee : ${PROJECT_LOG} not found" 
    153    exit 1 
     155    echo "${command} : eee : ${PROJECT_LOG} not found" 
     156    exit 1 
    154157fi 
    155158# 
     
    157160if [ ! -x ${PROJECT_LOG} ] 
    158161then 
    159    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    160    exit 1 
     162    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     163    exit 1 
    161164fi 
    162165# 
     
    164167if [ ! -w ${PROJECT_LOG} ] 
    165168then 
    166    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    167    exit 1 
     169    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     170    exit 1 
    168171fi 
    169172# 
     
    182185if  [ -f ${PROJECT_ID}/${fileref} ] 
    183186then 
    184    echo "${command} : iii : ${PROJECT_ID}/${fileref} exist" 1>> ${log} 
    185    echo "${command} : iii : nothing done" 1>> ${log} 
     187    echo "${command} : iii : ${PROJECT_ID}/${fileref} exist" 1>> ${log} 
     188    echo "${command} : iii : nothing done" 1>> ${log} 
    186189else 
    187    wget --tries=1 --no-verbose -P ${PROJECT_ID} ${locref}/${fileref_gz} 1>> ${log} 2>&1 
    188    wget_status=${?} 
    189    if [ ${wget_status} -ne 0 ] 
    190    then 
    191       echo "${command} : eee : ${locref}/${fileref_gz} not found" >> ${log} 2>&1 
    192       # exit 1 #++ 
    193    else 
    194       echo "${command} : iii : ${locref}/${fileref_gz} found" >> ${log} 2>&1 
    195    fi 
    196    unset wget_status 
    197    # 
    198    # decompress 
    199    gunzip ${PROJECT_ID}${fileref_gz} 
    200    gunzip_status=${?} 
    201    if [ ${gunzip_status} -ne 0 ] 
    202    then 
    203       echo "${command} : eee : ${locref}/${fileref_gz} not found" >> ${log} 2>&1 
    204       # exit 1 #++ 
    205    else 
    206       echo "${command} : iii : ${locref}/${fileref_gz} found" >> ${log} 2>&1 
    207    fi 
     190    wget --tries=1 --no-verbose -P ${PROJECT_ID} ${locref}/${fileref_gz} 1>> ${log} 2>&1 
     191    wget_status=${?} 
     192    if [ ${wget_status} -ne 0 ] 
     193    then 
     194        echo "${command} : eee : ${locref}/${fileref_gz} not found" >> ${log} 2>&1 
     195        # exit 1 #++ 
     196    else 
     197        echo "${command} : iii : ${locref}/${fileref_gz} found" >> ${log} 2>&1 
     198    fi 
     199    unset wget_status 
     200    # 
     201    # decompress 
     202    gunzip ${PROJECT_ID}${fileref_gz} 
     203    gunzip_status=${?} 
     204    if [ ${gunzip_status} -ne 0 ] 
     205    then 
     206        echo "${command} : eee : ${locref}/${fileref_gz} not found" >> ${log} 2>&1 
     207        # exit 1 #++ 
     208    else 
     209        echo "${command} : iii : ${locref}/${fileref_gz} found" >> ${log} 2>&1 
     210    fi 
    208211fi 
    209212unset fileref 
  • trunk/src/get_olr.sh

    r199 r203  
    1313# ======== 
    1414# 
    15 # :: 
     15# .. code-block:: bash 
    1616# 
    17 $ get_olr.sh 
     17  get_olr.sh 
    1818# 
    1919# DESCRIPTION 
     
    6565 
    6666wget  --tries=1 --no-verbose -P ${PROJECT_ID} \ 
    67      ftp://ftp.cdc.noaa.gov/Datasets/interp_OLR/olr.day.mean.nc 
     67ftp://ftp.cdc.noaa.gov/Datasets/interp_OLR/olr.day.mean.nc 
    6868 
    6969#ftp -n <<@DELIM 
  • trunk/src/get_olrnint.sh

    r97 r203  
    1313# ======== 
    1414# 
    15 # :: 
     15# .. code-block:: bash 
    1616# 
    17 $ get_olrnint.sh 
     17  get_olrnint.sh 
    1818# 
    1919# DESCRIPTION 
     
    5050# 
    5151#- 
    52  
    5352wget ftp://ftp.cdc.noaa.gov/Datasets/uninterp_OLR/olr.day.mean.nc 
    5453mv olr.day.mean.nc olr_nint.day.mean.nc 
    5554#~/data/OLR_NRT/extract_indian 
    5655#~/data/OLR_NRT/extract_indopac 
    57  
  • trunk/src/get_pirata_netcdf.sh

    r199 r203  
    1313# ======== 
    1414# 
    15 # :: 
    16 # 
    17 $ get_pirata_netcdf.sh 
     15# .. code-block:: bash 
     16# 
     17  get_pirata_netcdf.sh 
    1818# 
    1919# DESCRIPTION 
     
    6666# ======== 
    6767# 
    68 # You don't have any PIRATA reference data, you just have to run this tool :: 
    69 # 
    70 #  $ get_pirata_netcdf.sh 
    71 # 
    72 # And look at log file with :: 
    73 # 
    74 #  $ tlogd.sh get_pirata_netcdf 
     68# You don't have any PIRATA reference data, you just have to run this tool : 
     69# 
     70# .. code-block:: bash 
     71# 
     72#    get_pirata_netcdf.sh 
     73# 
     74# And look at log file with : 
     75# 
     76# .. code-block:: bash 
     77# 
     78#    tlogd.sh get_pirata_netcdf 
    7579# 
    7680# and of course on files in ${PROJECT_ID}. 
     
    112116system=$(uname) 
    113117case "${system}" in 
    114    AIX|IRIX64) 
    115       echo "www : no specific posix checking" 
    116    ;; 
    117    *) 
    118      set -o posix 
    119    ;; 
     118    AIX|IRIX64) 
     119        echo "www : no specific posix checking" 
     120    ;; 
     121    *) 
     122        set -o posix 
     123    ;; 
    120124esac 
    121125unset system 
     
    141145if [ ${status} -ne 0 ] 
    142146then 
    143    echo "${command} : eee : tool ${tool} not found" 
    144    exit 1 
     147    echo "${command} : eee : tool ${tool} not found" 
     148    exit 1 
    145149fi 
    146150unset status 
     
    150154if [ "${PROJECT_LOG}" = "" ] 
    151155then 
    152    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    153    exit 1 
     156    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     157    exit 1 
    154158fi 
    155159# 
     
    157161if [ ! -d ${PROJECT_LOG} ] 
    158162then 
    159    echo "${command} : eee : ${PROJECT_LOG} not found" 
    160    exit 1 
     163    echo "${command} : eee : ${PROJECT_LOG} not found" 
     164    exit 1 
    161165fi 
    162166# 
     
    164168if [ ! -x ${PROJECT_LOG} ] 
    165169then 
    166    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    167    exit 1 
     170    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     171    exit 1 
    168172fi 
    169173# 
     
    171175if [ ! -w ${PROJECT_LOG} ] 
    172176then 
    173    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    174    exit 1 
     177    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     178    exit 1 
    175179fi 
    176180# 
     
    198202for site in ${sitelist} 
    199203do 
    200    for var in ${varlist} 
    201    do 
    202        list_url="${list_url} ${locref}/${var}${site}_dy.cdf" 
    203    done 
     204    for var in ${varlist} 
     205    do 
     206        list_url="${list_url} ${locref}/${var}${site}_dy.cdf" 
     207    done 
    204208done 
    205209unset site 
     
    212216for url in ${list_url} 
    213217do 
    214   file=${PROJECT_ID}/$(basename ${url}) 
    215   if [ ! -f ${file} ] 
    216   then 
    217      wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 
     218    file=${PROJECT_ID}/$(basename ${url}) 
     219    if [ ! -f ${file} ] 
     220    then 
     221        wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 
    218222        --user=taopmelftp \ 
    219223        --password=G10b@LCh@Ng3 \ 
    220224        ${url} >> ${log} 2>&1 
    221      wget_status=${?} 
    222      if [ ${wget_status} -ne 0 ] 
    223      then 
    224         echo "${command} : eee : ${url} not found" >> ${log} 2>&1 
    225         # ++ exit 1 
    226      else 
    227         echo "${command} : iii : ${url} found" >> ${log} 2>&1 
    228      fi 
    229      unset wget_status 
    230   else 
    231      echo "iii : ${file} exists" >> ${log} 
    232   fi 
     225        wget_status=${?} 
     226        if [ ${wget_status} -ne 0 ] 
     227        then 
     228            echo "${command} : eee : ${url} not found" >> ${log} 2>&1 
     229            # ++ exit 1 
     230        else 
     231            echo "${command} : iii : ${url} found" >> ${log} 2>&1 
     232        fi 
     233        unset wget_status 
     234    else 
     235        echo "iii : ${file} exists" >> ${log} 
     236    fi 
    233237done 
    234238unset file 
  • trunk/src/get_rama_netcdf.sh

    r199 r203  
    1313# ======== 
    1414# 
    15 # :: 
    16 # 
    17 $ get_rama_netcdf.sh 
     15# .. code-block:: bash 
     16# 
     17  get_rama_netcdf.sh 
    1818# 
    1919# DESCRIPTION 
     
    6666# ======== 
    6767# 
    68 # You don't have any RAMA reference data, you just have to run this tool :: 
    69 # 
    70 #  $ get_rama_netcdf.sh 
    71 # 
    72 # And look at log file with :: 
    73 # 
    74 #  $ tlogd.sh get_rama_netcdf 
     68# You don't have any RAMA reference data, you just have to run this tool : 
     69# 
     70# .. code-block:: bash 
     71# 
     72#    get_rama_netcdf.sh 
     73# 
     74# And look at log file with : 
     75# 
     76# .. code-block:: bash 
     77# 
     78#    tlogd.sh get_rama_netcdf 
    7579# 
    7680# and of course on files in ${PROJECT_ID}. 
     
    9094# do we really need all these variables and sites 
    9195# 
    92 # Liste complète de RAMA:: 
    93 # 
    94 #  sitelist="                   16s55e    12s55e    8s55e    4s55e    1.5s55e    0n55e    1.5n55e    4n55e" 
    95 #  sitelist="${sitelist}                                                                               15n65e" 
    96 #  sitelist="${sitelist}                    12s67e     8s67e    4s67e    1.5s67e    0n67e     1.5n67e    4n67e    8n67e" 
    97 #  sitelist="${sitelist}  16s80.5e 12s80.5e 8s80.5e 4s80.5e 1.5s80.5e 0n80.5e 1.5n80.5e 4n80.5e" 
    98 #  sitelist="${sitelist}               1.5s90e 0n90e 1.5n90e 4n90e 8n90e 12n90e 15n90e 
    99 #  sitelist="${sitelist}  16s95e 12s95e 8s95e  5s95e" 
     96# Liste complète de RAMA: 
     97# 
     98# .. code-block:: bash 
     99# 
     100#    sitelist="16s55e    12s55e    8s55e    4s55e    1.5s55e    0n55e    1.5n55e    4n55e" 
     101#    sitelist="${sitelist} 15n65e" 
     102#    sitelist="${sitelist} 12s67e     8s67e    4s67e    1.5s67e    0n67e     1.5n67e    4n67e    8n67e" 
     103#    sitelist="${sitelist} 16s80.5e 12s80.5e 8s80.5e 4s80.5e 1.5s80.5e 0n80.5e 1.5n80.5e 4n80.5e" 
     104#    sitelist="${sitelist} 1.5s90e 0n90e 1.5n90e 4n90e 8n90e 12n90e 15n90e 
     105#    sitelist="${sitelist} 16s95e 12s95e 8s95e  5s95e" 
    100106# 
    101107# study wget status (no exit now on non null wget status) 
     
    121127system=$(uname) 
    122128case "${system}" in 
    123    AIX|IRIX64) 
    124       echo "www : no specific posix checking" 
    125    ;; 
    126    *) 
    127      set -o posix 
    128    ;; 
     129    AIX|IRIX64) 
     130        echo "www : no specific posix checking" 
     131    ;; 
     132    *) 
     133        set -o posix 
     134    ;; 
    129135esac 
    130136unset system 
     
    150156if [ ${status} -ne 0 ] 
    151157then 
    152    echo "${command} : eee : tool ${tool} not found" 
    153    exit 1 
     158    echo "${command} : eee : tool ${tool} not found" 
     159    exit 1 
    154160fi 
    155161unset status 
     
    159165if [ "${PROJECT_LOG}" = "" ] 
    160166then 
    161    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    162    exit 1 
     167    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     168    exit 1 
    163169fi 
    164170# 
     
    166172if [ ! -d ${PROJECT_LOG} ] 
    167173then 
    168    echo "${command} : eee : ${PROJECT_LOG} not found" 
    169    exit 1 
     174    echo "${command} : eee : ${PROJECT_LOG} not found" 
     175    exit 1 
    170176fi 
    171177# 
     
    173179if [ ! -x ${PROJECT_LOG} ] 
    174180then 
    175    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    176    exit 1 
     181    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     182    exit 1 
    177183fi 
    178184# 
     
    180186if [ ! -w ${PROJECT_LOG} ] 
    181187then 
    182    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    183    exit 1 
     188    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     189    exit 1 
    184190fi 
    185191# 
     
    214220for site in ${sitelist} 
    215221do 
    216    for var in ${varlist} 
    217    do 
    218        list_url="${list_url} ${locref}/${var}${site}_dy.cdf" 
    219    done 
     222    for var in ${varlist} 
     223    do 
     224        list_url="${list_url} ${locref}/${var}${site}_dy.cdf" 
     225    done 
    220226done 
    221227unset site 
     
    228234for url in ${list_url} 
    229235do 
    230   file=${PROJECT_ID}/$(basename ${url}) 
    231   if [ ! -f ${file} ] 
    232   then 
    233      wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 
     236    file=${PROJECT_ID}/$(basename ${url}) 
     237    if [ ! -f ${file} ] 
     238    then 
     239        wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 
    234240        --user=taopmelftp \ 
    235241        --password=G10b@LCh@Ng3 \ 
    236242        ${url} >> ${log} 2>&1 
    237      wget_status=${?} 
    238      if [ ${wget_status} -ne 0 ] 
    239      then 
    240         echo "${command} : eee : ${url} not found" >> ${log} 2>&1 
    241         # ++ exit 1 
    242      else 
    243         echo "${command} : iii : ${url} found" >> ${log} 2>&1 
    244      fi 
    245      unset wget_status 
    246   else 
    247      echo "iii : ${file} exists" >> ${log} 
    248   fi 
     243        wget_status=${?} 
     244        if [ ${wget_status} -ne 0 ] 
     245        then 
     246            echo "${command} : eee : ${url} not found" >> ${log} 2>&1 
     247            # ++ exit 1 
     248        else 
     249            echo "${command} : iii : ${url} found" >> ${log} 2>&1 
     250        fi 
     251        unset wget_status 
     252    else 
     253        echo "iii : ${file} exists" >> ${log} 
     254    fi 
    249255done 
    250256unset file 
  • trunk/src/get_swr.sh

    r199 r203  
    1313# ======== 
    1414# 
    15 # :: 
    16 # 
    17 $ get_swr.sh 
     15# .. code-block:: bash 
     16# 
     17  get_swr.sh 
    1818# 
    1919# DESCRIPTION 
     
    4545# ======== 
    4646# 
    47 # You don't have any RAMA reference data, you just have to run this tool :: 
    48 # 
    49 #  $ get_swr.sh 
    50 # 
    51 # And look at log file with :: 
    52 # 
    53 #  $ tlogd.sh get_swr 
     47# You don't have any RAMA reference data, you just have to run this tool : 
     48# 
     49# .. code-block:: bash 
     50# 
     51#    get_swr.sh 
     52# 
     53# And look at log file with : 
     54# 
     55# .. code-block:: bash 
     56# 
     57#    tlogd.sh get_swr 
    5458# 
    5559# and of course on files in ${PROJECT_ID}. 
     
    9296system=$(uname) 
    9397case "${system}" in 
    94    AIX|IRIX64) 
    95       echo "www : no specific posix checking" 
    96       date_cmd=date 
    97    ;; 
    98    Darwin) 
    99       set -o posix 
    100       date_cmd=gdate 
    101    ;; 
    102    Linux) 
    103       set -o posix 
    104       date_cmd=date 
    105    ;; 
    106    *) 
    107      set -o posix 
    108    ;; 
     98    AIX|IRIX64) 
     99        echo "www : no specific posix checking" 
     100        date_cmd=date 
     101    ;; 
     102    Darwin) 
     103        set -o posix 
     104        date_cmd=gdate 
     105    ;; 
     106    Linux) 
     107        set -o posix 
     108        date_cmd=date 
     109    ;; 
     110    *) 
     111        set -o posix 
     112    ;; 
    109113esac 
    110114unset system 
     
    130134if [ ${status} -ne 0 ] 
    131135then 
    132    echo "${command} : eee : tool ${tool} not found" 
    133    exit 1 
     136    echo "${command} : eee : tool ${tool} not found" 
     137    exit 1 
    134138fi 
    135139unset status 
     
    139143if [ "${PROJECT_LOG}" = "" ] 
    140144then 
    141    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    142    exit 1 
     145    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     146    exit 1 
    143147fi 
    144148# 
     
    146150if [ ! -d ${PROJECT_LOG} ] 
    147151then 
    148    echo "${command} : eee : ${PROJECT_LOG} not found" 
    149    exit 1 
     152    echo "${command} : eee : ${PROJECT_LOG} not found" 
     153    exit 1 
    150154fi 
    151155# 
     
    153157if [ ! -x ${PROJECT_LOG} ] 
    154158then 
    155    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    156    exit 1 
     159    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     160    exit 1 
    157161fi 
    158162# 
     
    160164if [ ! -w ${PROJECT_LOG} ] 
    161165then 
    162    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    163    exit 1 
     166    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     167    exit 1 
    164168fi 
    165169# 
     
    186190while [ ${yyyy} -le ${yearmax} ] 
    187191do 
    188    for var in ${varlist} 
    189    do 
    190        list_url="${list_url} ${locref}/${var}_isccp_${yyyy}.nc.gz" 
    191    done 
    192    unset var 
    193    yyyy=$(( ${yyyy} + 1 )) 
     192    for var in ${varlist} 
     193    do 
     194        list_url="${list_url} ${locref}/${var}_isccp_${yyyy}.nc.gz" 
     195    done 
     196    unset var 
     197    yyyy=$(( ${yyyy} + 1 )) 
    194198done 
    195199unset varlist 
     
    199203for url in ${list_url} 
    200204do 
    201   file_gz=${PROJECT_ID}/$(basename ${url}) 
    202   file=${PROJECT_ID}/$(basename ${file_gz} .gz) 
    203   if [ ! -f ${file} ] 
    204   then 
    205       if [ ! -f ${file_gz} ] 
    206       then 
    207          wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 
     205    file_gz=${PROJECT_ID}/$(basename ${url}) 
     206    file=${PROJECT_ID}/$(basename ${file_gz} .gz) 
     207    if [ ! -f ${file} ] 
     208    then 
     209        if [ ! -f ${file_gz} ] 
     210        then 
     211            wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 
    208212            ${url} >> ${log} 2>&1 
    209          wget_status=${?} 
    210          if [ ${wget_status} -ne 0 ] 
    211          then 
    212             echo "${command} : eee : ${url} not found" >> ${log} 2>&1 
    213             # ++ exit 1 
    214          else 
    215             echo "${command} : iii : ${url} found" >> ${log} 2>&1 
    216          fi 
    217          unset wget_status 
    218       else 
    219          echo "iii : ${file_gz} exists" >> ${log} 
    220          gunzip -c ${file_gz} > ${file} 
    221       fi 
    222    else 
    223       echo "iii : ${file} exists" >> ${log} 
    224    fi 
     213            wget_status=${?} 
     214            if [ ${wget_status} -ne 0 ] 
     215            then 
     216                echo "${command} : eee : ${url} not found" >> ${log} 2>&1 
     217                # ++ exit 1 
     218            else 
     219                echo "${command} : iii : ${url} found" >> ${log} 2>&1 
     220            fi 
     221            unset wget_status 
     222        else 
     223            echo "iii : ${file_gz} exists" >> ${log} 
     224            gunzip -c ${file_gz} > ${file} 
     225        fi 
     226    else 
     227        echo "iii : ${file} exists" >> ${log} 
     228    fi 
    225229done 
    226230unset file_gz 
  • trunk/src/get_tao_netcdf.sh

    r199 r203  
    1313# ======== 
    1414# 
    15 # :: 
    16 # 
    17 $ get_tao_netcdf.sh 
     15# .. code-block:: bash 
     16# 
     17  get_tao_netcdf.sh 
    1818# 
    1919# DESCRIPTION 
     
    6666# ======== 
    6767# 
    68 # You don't have any TAO reference data, you just have to run this tool :: 
    69 # 
    70 #  $ get_tao_netcdf.sh 
    71 # 
    72 # And look at log file with :: 
    73 # 
    74 #  $ tlogd.sh get_tao_netcdf 
     68# You don't have any TAO reference data, you just have to run this tool : 
     69# 
     70# .. code-block:: bash 
     71# 
     72#    get_tao_netcdf.sh 
     73# 
     74# And look at log file with : 
     75# 
     76# .. code-block:: bash 
     77# 
     78#    tlogd.sh get_tao_netcdf 
    7579# 
    7680# and of course on files in ${PROJECT_ID}. 
     
    112116system=$(uname) 
    113117case "${system}" in 
    114    AIX|IRIX64) 
    115       echo "www : no specific posix checking" 
    116    ;; 
    117    *) 
    118      set -o posix 
    119    ;; 
     118    AIX|IRIX64) 
     119        echo "www : no specific posix checking" 
     120    ;; 
     121    *) 
     122        set -o posix 
     123    ;; 
    120124esac 
    121125unset system 
     
    141145if [ ${status} -ne 0 ] 
    142146then 
    143    echo "${command} : eee : tool ${tool} not found" 
    144    exit 1 
     147    echo "${command} : eee : tool ${tool} not found" 
     148    exit 1 
    145149fi 
    146150unset status 
     
    150154if [ "${PROJECT_LOG}" = "" ] 
    151155then 
    152    echo "${command} : eee : \${PROJECT_LOG} not defined" 
    153    exit 1 
     156    echo "${command} : eee : \${PROJECT_LOG} not defined" 
     157    exit 1 
    154158fi 
    155159# 
     
    157161if [ ! -d ${PROJECT_LOG} ] 
    158162then 
    159    echo "${command} : eee : ${PROJECT_LOG} not found" 
    160    exit 1 
     163    echo "${command} : eee : ${PROJECT_LOG} not found" 
     164    exit 1 
    161165fi 
    162166# 
     
    164168if [ ! -x ${PROJECT_LOG} ] 
    165169then 
    166    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
    167    exit 1 
     170    echo "${command} : eee : ${PROJECT_LOG} not reachable" 
     171    exit 1 
    168172fi 
    169173# 
     
    171175if [ ! -w ${PROJECT_LOG} ] 
    172176then 
    173    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    174    exit 1 
     177    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     178    exit 1 
    175179fi 
    176180# 
     
    205209for site in ${sitelist} 
    206210do 
    207    for var in ${varlist} 
    208    do 
    209        list_url="${list_url} ${locref}/${var}${site}_dy.cdf" 
    210    done 
     211    for var in ${varlist} 
     212    do 
     213        list_url="${list_url} ${locref}/${var}${site}_dy.cdf" 
     214    done 
    211215done 
    212216unset site 
     
    219223for url in ${list_url} 
    220224do 
    221   file=${PROJECT_ID}/$(basename ${url}) 
    222   if [ ! -f ${file} ] 
    223   then 
    224      wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 
     225    file=${PROJECT_ID}/$(basename ${url}) 
     226    if [ ! -f ${file} ] 
     227    then 
     228        wget --tries=1 --no-verbose -P ${PROJECT_ID} \ 
    225229        --user=taopmelftp \ 
    226230        --password=G10b@LCh@Ng3 \ 
    227231        ${url} >> ${log} 2>&1 
    228      wget_status=${?} 
    229      if [ ${wget_status} -ne 0 ] 
    230      then 
    231         echo "${command} : eee : ${url} not found" >> ${log} 2>&1 
    232         # ++ exit 1 
    233      else 
    234         echo "${command} : iii : ${url} found" >> ${log} 2>&1 
    235      fi 
    236      unset wget_status 
    237   else 
    238      echo "iii : ${file} exists" >> ${log} 
    239   fi 
     232        wget_status=${?} 
     233        if [ ${wget_status} -ne 0 ] 
     234        then 
     235            echo "${command} : eee : ${url} not found" >> ${log} 2>&1 
     236            # ++ exit 1 
     237        else 
     238            echo "${command} : iii : ${url} found" >> ${log} 2>&1 
     239        fi 
     240        unset wget_status 
     241    else 
     242        echo "iii : ${file} exists" >> ${log} 
     243    fi 
    240244done 
    241245unset file 
  • trunk/src/interp_erai_dewt.pro

    r191 r203  
    9292; ======== 
    9393; 
    94 ; With ERA-I type 1:: 
    95 ; 
    96 ;  .compile file_interp 
    97 ;  yyyymmddb = 20000101L 
    98 ;  yyyymmdde = 20001231L 
    99 ;  eraitype = 1 
    100 ;  result = interp_erai_dewt(yyyymmddb, yyyymmdde, eraitype) 
    101 ;  print, result 
    102 ; 
    103 ; With ERA-I type 2:: 
    104 ; 
    105 ;  .compile file_interp 
    106 ;  yyyymmddb = 20000101L 
    107 ;  yyyymmdde = 20001231L 
    108 ;  eraitype = 2 
    109 ;  result = interp_erai_dewt(yyyymmddb, yyyymmdde, eraitype) 
    110 ;  print, result 
     94; With ERA-I type 1: 
     95; 
     96; .. code-block:: idl 
     97; 
     98;    .compile file_interp 
     99;    yyyymmddb = 20000101L 
     100;    yyyymmdde = 20001231L 
     101;    eraitype = 1 
     102;    result = interp_erai_dewt(yyyymmddb, yyyymmdde, eraitype) 
     103;    print, result 
     104; 
     105; With ERA-I type 2: 
     106; 
     107; .. code-block:: idl 
     108; 
     109;    .compile file_interp 
     110;    yyyymmddb = 20000101L 
     111;    yyyymmdde = 20001231L 
     112;    eraitype = 2 
     113;    result = interp_erai_dewt(yyyymmddb, yyyymmdde, eraitype) 
     114;    print, result 
    111115; 
    112116; TIPS 
    113117; ==== 
    114118; 
    115 ; To see some values of variable :: 
    116 ; 
    117 ;   $ ncks -v d2m -d time,0,1 -d latitude,0,1 -d longitude,0,1 \ 
    118 ;     $PROJECT_ID/erai_d2m_19890101_20091231_oafluxgrid.nc 
     119; To see some values of variable : 
     120; 
     121; .. code-block:: bash 
     122; 
     123;    ncks -v d2m -d time,0,1 -d latitude,0,1 -d longitude,0,1 \ 
     124;    $PROJECT_ID/erai_d2m_19890101_20091231_oafluxgrid.nc 
    119125; 
    120126; TODO 
     
    230236     ras = report(msg) 
    231237     return, result 
    232            END 
    233  ELSE: BEGIN 
    234      msg = 'iii : ${PROJECT_ID} is ' + project_id_env 
    235      ras = report(msg) 
    236        END 
     238    END 
     239    ELSE: BEGIN 
     240        msg = 'iii : ${PROJECT_ID} is ' + project_id_env 
     241        ras = report(msg) 
     242    END 
    237243ENDCASE 
    238244; 
     
    241247; existence and protection of ${PROJECT_ID} 
    242248IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
    243    msg = 'eee : the directory' + iodirin  + ' is not accessible.' 
    244    ras = report(msg) 
    245    return, result 
     249    msg = 'eee : the directory' + iodirin  + ' is not accessible.' 
     250    ras = report(msg) 
     251    return, result 
    246252ENDIF 
    247253; 
     
    254260fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) 
    255261IF fullfilename_msk[0] EQ '' THEN BEGIN 
    256    msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 
    257    ras = report(msg) 
    258    return, result 
     262    msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 
     263    ras = report(msg) 
     264    return, result 
    259265ENDIF 
    260266; 
     
    280286fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 
    281287IF fullfilename[0] EQ '' THEN BEGIN 
    282    msg = 'eee : the file ' + fullfilename + ' was not found.' 
    283    ras = report(msg) 
    284    return, result 
     288    msg = 'eee : the file ' + fullfilename + ' was not found.' 
     289    ras = report(msg) 
     290    return, result 
    285291ENDIF 
    286292; 
    287293; test if ${PROJECT_OD} defined 
    288294CASE project_od_env OF 
    289   '' : BEGIN 
     295    '' : BEGIN 
    290296         msg = 'eee : ${PROJECT_OD} is not defined' 
    291297         ras = report(msg) 
    292298       return, result 
    293        END 
    294   ELSE: BEGIN 
     299    END 
     300    ELSE: BEGIN 
    295301          msg = 'iii : ${PROJECT_OD} is ' + project_od_env 
    296302          ras = report(msg) 
    297         END 
    298  ENDCASE 
     303    END 
     304ENDCASE 
    299305; 
    300306; check if output data will be possible 
     
    313319; in order to avoid unexpected overwritten 
    314320IF ((FILE_TEST(fullfilename_out) EQ 1)  AND (project_overwrite EQ 0)) THEN BEGIN 
    315    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
    316    ras = report(msg) 
    317    return, result 
     321    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     322    ras = report(msg) 
     323    return, result 
    318324ENDIF 
    319325; 
     
    350356d2mout=fltarr(jpi,jpj,jptin) 
    351357for jt=0,jptin-1 do begin 
    352   ; ++ print, 'Interpolation jt=',jt,' / ',jptin-1 
    353   tab=reform(d2min[*,*,jt]) 
    354   d2mout[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ 
     358    ; ++ print, 'Interpolation jt=',jt,' / ',jptin-1 
     359    tab=reform(d2min[*,*,jt]) 
     360    d2mout[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ 
    355361      , lonout,latout,method='bilinear' $ 
    356362      , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
    357   d2mout[*,*,jt]=d2mout[*,*,jt]*mskout+(1.-mskout)*1.e20 
     363    d2mout[*,*,jt]=d2mout[*,*,jt]*mskout+(1.-mskout)*1.e20 
    358364endfor 
    359365; 
  • trunk/src/interp_erai_lwr.pro

    r191 r203  
    9292; ======== 
    9393; 
    94 ; With ERA-I type 1:: 
    95 ; 
    96 ;  .compile file_interp 
    97 ;  eraitype = 1 
    98 ;  yyyymmddb = 20000101L 
    99 ;  yyyymmdde = 20001231L 
    100 ;  result = interp_erai_lwr(yyyymmddb, yyyymmdde, eraitype) 
    101 ;  print, result 
    102 ; 
    103 ; With ERA-I type 2:: 
    104 ; 
    105 ;  .compile file_interp 
    106 ;  eraitype = 2 
    107 ;  yyyymmddb = 20000101L 
    108 ;  yyyymmdde = 20001231L 
    109 ;  result = interp_erai_lwr(yyyymmddb, yyyymmdde, eraitype) 
    110 ;  print, result 
     94; With ERA-I type 1: 
     95; 
     96; .. code-block:: idl 
     97; 
     98;    .compile file_interp 
     99;    eraitype = 1 
     100;    yyyymmddb = 20000101L 
     101;    yyyymmdde = 20001231L 
     102;    result = interp_erai_lwr(yyyymmddb, yyyymmdde, eraitype) 
     103;    print, result 
     104; 
     105; With ERA-I type 2: 
     106; 
     107; .. code-block:: idl 
     108; 
     109;    .compile file_interp 
     110;    eraitype = 2 
     111;    yyyymmddb = 20000101L 
     112;    yyyymmdde = 20001231L 
     113;    result = interp_erai_lwr(yyyymmddb, yyyymmdde, eraitype) 
     114;    print, result 
    111115; 
    112116; TODO 
     
    119123; reach end but bad values (all NaN) 
    120124; 
    121 ; make it work : pb on loholt1 idl6:: 
    122 ; 
    123 ;   lwr[longitude,latitude,time]=lwrout:lwr_attr; longitude[]=xlon:lon_attr; latitude[]=ylat:lat_attr; tt[*time]=tt:time_attr  @ globattr 
    124 ;   % NCDF_VARPUT: Operation Failed, bad file (4) or variable [0] id ? 
     125; make it work : pb on loholt1 idl6: 
     126; 
     127; .. parsed-literal:: 
     128; 
     129;    lwr[longitude,latitude,time]=lwrout:lwr_attr; longitude[]=xlon:lon_attr; latitude[]=ylat:lat_attr; tt[*time]=tt:time_attr  @ globattr 
     130;    % NCDF_VARPUT: Operation Failed, bad file (4) or variable [0] id ? 
    125131;                  (NC_ERROR=-31) 
    126 ;   % Stop encountered: INTERP_ERAI_LWR_1989_2009    1 
    127 ;     /home/pinsard/tropflux_ws/src/interp_erai_lwr_1989_2009.pro 
     132;    % Stop encountered: INTERP_ERAI_LWR_1989_2009    1 
     133;      /home/pinsard/tropflux_ws/src/interp_erai_lwr_1989_2009.pro 
    128134; 
    129135; check OUTMASK_IND and SET_OUTMSKVAL added to call_interp2d call 
     
    195201;     .. note:: 
    196202; 
    197 ;        IDL do not warn when asking size of an undefined array:: 
    198 ; 
    199 ;           IDL> must_crash=size(ginette) 
     203;        IDL do not warn when asking size of an undefined array: 
     204; 
     205;        .. code-block:: idl 
     206; 
     207;           must_crash=size(ginette) 
    200208; 
    201209; - pinsard 2011-07-05T07:33:36Z loholt1.ipsl.polytechnique.fr (Linux) 
     
    241249nparam = N_PARAMS() 
    242250IF (nparam NE 3) THEN BEGIN 
    243    ras = report(['Incorrect number of arguments.' $ 
     251    ras = report(['Incorrect number of arguments.' $ 
    244252         + '!C' $ 
    245253         + 'Usage : ' + usage]) 
    246    return, result 
     254    return, result 
    247255ENDIF 
    248256; 
     
    255263     ras = report(msg) 
    256264     return, result 
    257            END 
    258  ELSE: BEGIN 
     265    END 
     266    ELSE: BEGIN 
    259267     msg = 'iii : ${PROJECT_ID} is ' + project_id_env 
    260268     ras = report(msg) 
    261        END 
     269    END 
    262270ENDCASE 
    263271; 
     
    266274; existence and protection of ${PROJECT_ID} 
    267275IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
    268    msg = 'eee : the directory' + iodirin  + ' is not accessible.' 
    269    ras = report(msg) 
    270    return, result 
     276    msg = 'eee : the directory' + iodirin  + ' is not accessible.' 
     277    ras = report(msg) 
     278    return, result 
    271279ENDIF 
    272280; 
     
    279287fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) 
    280288IF fullfilename_msk[0] EQ '' THEN BEGIN 
    281    msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 
    282    ras = report(msg) 
    283    return, result 
     289    msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 
     290    ras = report(msg) 
     291    return, result 
    284292ENDIF 
    285293; 
     
    308316fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 
    309317IF fullfilename[0] EQ '' THEN BEGIN 
    310    msg = 'eee : the file ' + fullfilename + ' was not found.' 
    311    ras = report(msg) 
    312    return, result 
     318    msg = 'eee : the file ' + fullfilename + ' was not found.' 
     319    ras = report(msg) 
     320    return, result 
    313321ENDIF 
    314322; 
    315323; test if ${PROJECT_OD} defined 
    316324CASE project_od_env OF 
    317   '' : BEGIN 
     325    '' : BEGIN 
    318326         msg = 'eee : ${PROJECT_OD} is not defined' 
    319327         ras = report(msg) 
    320328       return, result 
    321        END 
    322   ELSE: BEGIN 
     329    END 
     330    ELSE: BEGIN 
    323331          msg = 'iii : ${PROJECT_OD} is ' + project_od_env 
    324332          ras = report(msg) 
    325         END 
    326  ENDCASE 
     333    END 
     334ENDCASE 
    327335; 
    328336; check if output data will be possible 
     
    341349; in order to avoid unexpected overwritten 
    342350IF ((FILE_TEST(fullfilename_out) EQ 1)  AND (project_overwrite EQ 0)) THEN BEGIN 
    343    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
    344    ras = report(msg) 
    345    return, result 
     351    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     352    ras = report(msg) 
     353    return, result 
    346354ENDIF 
    347355; 
     
    379387; 
    380388for jt=0,jptin-1 do begin 
    381   ; ++print, 'Interpolation jt=',jt,' / ',jptin-1 
    382 ; 
    383   tab=reform(lwrin[*,*,jt]) 
    384   lwrout[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ 
    385       , lonout,latout,method='bilinear' $ 
    386       , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
    387   lwrout[*,*,jt]=lwrout[*,*,jt]*mskout+(1.-mskout)*1.e20 
    388 ; 
     389    ; ++print, 'Interpolation jt=',jt,' / ',jptin-1 
     390    ; 
     391    tab=reform(lwrin[*,*,jt]) 
     392    lwrout[*,*,jt]=call_interp2d(tab,lonin,latin,mskin $ 
     393    , lonout,latout,method='bilinear' $ 
     394    , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
     395    lwrout[*,*,jt]=lwrout[*,*,jt]*mskout+(1.-mskout)*1.e20 
     396    ; 
    389397endfor 
    390398; 
  • trunk/src/interp_erai_msl.pro

    r191 r203  
    9393; ======== 
    9494; 
    95 ; With ERA-I type 1:: 
    96 ; 
    97 ;  .compile file_interp 
    98 ;  yyyymmddb = 20000101L 
    99 ;  yyyymmdde = 20001231L 
    100 ;  eraitype = 1 
    101 ;  result = interp_erai_msl(yyyymmddb, yyyymmdde, eraitype) 
    102 ;  print, result 
    103 ; 
    104 ; With ERA-I type 2:: 
    105 ; 
    106 ;  .compile file_interp 
    107 ;  yyyymmddb = 20000101L 
    108 ;  yyyymmdde = 20001231L 
    109 ;  eraitype = 2 
    110 ;  result = interp_erai_msl(yyyymmddb, yyyymmdde, eraitype) 
    111 ;  print, result 
     95; With ERA-I type 1: 
     96; 
     97; .. code-block:: idl 
     98; 
     99;    .compile file_interp 
     100;    yyyymmddb = 20000101L 
     101;    yyyymmdde = 20001231L 
     102;    eraitype = 1 
     103;    result = interp_erai_msl(yyyymmddb, yyyymmdde, eraitype) 
     104;    print, result 
     105; 
     106; With ERA-I type 2: 
     107; 
     108; .. code-block:: idl 
     109; 
     110;   .compile file_interp 
     111;    yyyymmddb = 20000101L 
     112;    yyyymmdde = 20001231L 
     113;    eraitype = 2 
     114;    result = interp_erai_msl(yyyymmddb, yyyymmdde, eraitype) 
     115;    print, result 
    112116; 
    113117; TODO 
  • trunk/src/interp_erai_sst.pro

    r191 r203  
    9292; ======== 
    9393; 
    94 ; With ERA-I type 1:: 
    95 ; 
    96 ;  .compile file_interp 
    97 ;  yyyymmddb = 20000101L 
    98 ;  yyyymmdde = 20001231L 
    99 ;  eraitype = 1 
    100 ;  result = interp_erai_sst(yyyymmddb, yyyymmdde, eraitype) 
    101 ;  print, result 
    102 ; 
    103 ; With ERA-I type 2:: 
    104 ; 
    105 ;  .compile file_interp 
    106 ;  yyyymmddb = 20000101L 
    107 ;  yyyymmdde = 20001231L 
    108 ;  eraitype = 2 
    109 ;  result = interp_erai_sst(yyyymmddb, yyyymmdde, eraitype) 
     94; With ERA-I type 1: 
     95; 
     96; .. code-block:: idl 
     97; 
     98;    .compile file_interp 
     99;    yyyymmddb = 20000101L 
     100;    yyyymmdde = 20001231L 
     101;    eraitype = 1 
     102;    result = interp_erai_sst(yyyymmddb, yyyymmdde, eraitype) 
     103;    print, result 
     104; 
     105; With ERA-I type 2: 
     106; 
     107; .. code-block:: idl 
     108; 
     109;    .compile file_interp 
     110;    yyyymmddb = 20000101L 
     111;    yyyymmdde = 20001231L 
     112;    eraitype = 2 
     113;    result = interp_erai_sst(yyyymmddb, yyyymmdde, eraitype) 
    110114; 
    111115; TODO 
  • trunk/src/interp_erai_t2m.pro

    r191 r203  
    9696; ======== 
    9797; 
    98 ; With ERA-I type 1:: 
    99 ; 
    100 ;  .compile file_interp 
    101 ;  yyyymmddb = 20000101L 
    102 ;  yyyymmdde = 20001231L 
    103 ;  eraitype = 1 
    104 ;  result = interp_erai_t2m(yyyymmddb, yyyymmdde, eraitype) 
    105 ;  print, result 
    106 ; 
    107 ; With ERA-I type 2:: 
    108 ; 
    109 ;  .compile file_interp 
    110 ;  yyyymmddb = 20000101L 
    111 ;  yyyymmdde = 20001231L 
    112 ;  eraitype = 2 
    113 ;  result = interp_erai_t2m(yyyymmddb, yyyymmdde, eraitype) 
    114 ;  print, result 
     98; With ERA-I type 1: 
     99; 
     100; .. code-block:: idl 
     101; 
     102;    .compile file_interp 
     103;    yyyymmddb = 20000101L 
     104;    yyyymmdde = 20001231L 
     105;    eraitype = 1 
     106;    result = interp_erai_t2m(yyyymmddb, yyyymmdde, eraitype) 
     107;    print, result 
     108; 
     109; With ERA-I type 2: 
     110; 
     111; .. code-block:: idl 
     112; 
     113;    .compile file_interp 
     114;    yyyymmddb = 20000101L 
     115;    yyyymmdde = 20001231L 
     116;    eraitype = 2 
     117;    result = interp_erai_t2m(yyyymmddb, yyyymmdde, eraitype) 
     118;    print, result 
    115119; 
    116120; TODO 
     
    127131; make it work : pb on loholt1 idl8 
    128132; 
    129 ; reach end but bad time and t2m values :: 
    130 ; 
    131 ;   $ ncks -v t2m  -d time,0,1 -d latitude,0,1 -d longitude,0,1 /homedata/pinsard/tropflux_d/erai_t2m_19890101_20091231_oafluxgrid.nc 
     133; reach end but bad time and t2m values : 
     134; 
     135; .. code-block:: bash 
     136; 
     137;     ncks -v t2m  -d time,0,1 -d latitude,0,1 -d longitude,0,1 /homedata/pinsard/tropflux_d/erai_t2m_19890101_20091231_oafluxgrid.nc 
    132138;     latitude[0]=-29.5 degrees_north 
    133139;     latitude[1]=-28.5 degrees_north 
     
    227233;     usage of timestep keyword in read_ncdf was not efficient because of  memory problem : 
    228234;     can not read the whole time range (ok with 7580, not ok with 7591 while need is 7670 
    229 ;     :: 
    230 ; 
    231 ;       % Unable to allocate memory: to make array. 
    232 ;       Cannot allocate memory 
    233 ; 
    234 ;     When timestep keyword is not used we can see these messages:: 
    235 ; 
    236 ;        /usr/work/incas/fplod/tropflux_d/20c3m_erai_t2_TROP_1989_2009.nc as no time axis variable 
    237 ;        given by Praveen 
    238 ; 
     235; 
     236;     .. parsed-literal:: 
     237; 
     238;        % Unable to allocate memory: to make array. 
     239;        Cannot allocate memory 
     240; 
     241;     When timestep keyword is not used we can see these messages: 
     242; 
     243;     .. parsed-literal:: 
     244; 
     245;        /usr/work/incas/fplod/tropflux_d/20c3m_erai_t2_TROP_1989_2009.nc has no time axis variable 
     246; 
     247;     given by Praveen 
     248; 
     249;     .. parsed-literal:: 
     250 
    239251;        Value of Julian date is out of allowed range 
    240252; 
  • trunk/src/interp_erai_ws.pro

    r191 r203  
    108108; ======== 
    109109; 
    110 ; With ERA-I type 1:: 
    111 ; 
    112 ;  .compile file_interp 
    113 ;  yyyymmddb = 20000101L 
    114 ;  yyyymmdde = 20001231L 
    115 ;  eraitype = 1 
    116 ;  result = interp_erai_ws(yyyymmddb, yyyymmdde, eraitype) 
    117 ;  print, result 
    118 ; 
    119 ; With ERA-I type 2:: 
    120 ; 
    121 ;  .compile file_interp 
    122 ;  yyyymmddb = 20000101L 
    123 ;  yyyymmdde = 20001231L 
    124 ;  eraitype = 2 
    125 ;  result = interp_erai_ws(yyyymmddb, yyyymmdde, eraitype) 
     110; With ERA-I type 1: 
     111; 
     112; .. code-block:: idl 
     113; 
     114;    .compile file_interp 
     115;    yyyymmddb = 20000101L 
     116;    yyyymmdde = 20001231L 
     117;    eraitype = 1 
     118;    result = interp_erai_ws(yyyymmddb, yyyymmdde, eraitype) 
     119;    print, result 
     120; 
     121; With ERA-I type 2: 
     122; 
     123; .. code-block:: idl 
     124; 
     125;    .compile file_interp 
     126;    yyyymmddb = 20000101L 
     127;    yyyymmdde = 20001231L 
     128;    eraitype = 2 
     129;    result = interp_erai_ws(yyyymmddb, yyyymmdde, eraitype) 
    126130; 
    127131; TODO 
     
    132136; make it work : pb on loholt1 idl8 
    133137; 
    134 ; reach end but bad values et nb timestep 4581:: 
    135 ; 
    136 ;     ncks -v u10  -d time,0,1 -d latitude,0,1 -d longitude,0,1 /homedata/pinsard/tropflux_d/erai_ws_19890101_20091231_oafluxgrid.nc 
    137 ;     latitude[0]=-29.5 degrees_north 
    138 ;     latitude[1]=-28.5 degrees_north 
    139 ; 
    140 ;     longitude[0]=30.5 degrees_east 
    141 ;     longitude[1]=31.5 degrees_east 
    142 ; 
    143 ;     time[0] latitude[0]=-29.5 longitude[0]=30.5 u10[0]=9.96921e+36 m/s 
    144 ;     time[0] latitude[0]=-29.5 longitude[1]=31.5 u10[1]=9.96921e+36 m/s 
    145 ;     time[0] latitude[1]=-28.5 longitude[0]=30.5 u10[350]=9.96921e+36 m/s 
    146 ;     time[0] latitude[1]=-28.5 longitude[1]=31.5 u10[351]=9.96921e+36 m/s 
    147 ;     time[1] latitude[0]=-29.5 longitude[0]=30.5 u10[21000]=9.96921e+36 m/s 
    148 ;     time[1] latitude[0]=-29.5 longitude[1]=31.5 u10[21001]=9.96921e+36 m/s 
    149 ;     time[1] latitude[1]=-28.5 longitude[0]=30.5 u10[21350]=9.96921e+36 m/s 
    150 ;     time[1] latitude[1]=-28.5 longitude[1]=31.5 u10[21351]=9.96921e+36 m/s 
    151 ; 
    152 ; make it work : pb on loholt1 idl6:: 
    153 ; 
    154 ;   Writing fields: 
    155 ;   u10[longitude,latitude,time]=u10out:u10_attr; v10[longitude,latitude,time]=v10out:v10_attr; longitude[]=xlon:lon_attr; latitude[]=ylat:lat_attr; tt[*time]=tt:time_attr  @ globattr 
    156 ;   % NCDF_VARPUT: Operation Failed, bad file (6) or variable [0] id ? 
    157 ;                  (NC_ERROR=-31) 
    158 ;   % Stop encountered: INTERP_ERAI_WS_1989_2009    1 
     138; reach end but bad values et nb timestep 4581: 
     139; 
     140; .. code-block:: bash 
     141; 
     142;    ncks -v u10  -d time,0,1 -d latitude,0,1 -d longitude,0,1 /homedata/pinsard/tropflux_d/erai_ws_19890101_20091231_oafluxgrid.nc 
     143;    latitude[0]=-29.5 degrees_north 
     144;    latitude[1]=-28.5 degrees_north 
     145; 
     146;    longitude[0]=30.5 degrees_east 
     147;    longitude[1]=31.5 degrees_east 
     148; 
     149;    time[0] latitude[0]=-29.5 longitude[0]=30.5 u10[0]=9.96921e+36 m/s 
     150;    time[0] latitude[0]=-29.5 longitude[1]=31.5 u10[1]=9.96921e+36 m/s 
     151;    time[0] latitude[1]=-28.5 longitude[0]=30.5 u10[350]=9.96921e+36 m/s 
     152;    time[0] latitude[1]=-28.5 longitude[1]=31.5 u10[351]=9.96921e+36 m/s 
     153;    time[1] latitude[0]=-29.5 longitude[0]=30.5 u10[21000]=9.96921e+36 m/s 
     154;    time[1] latitude[0]=-29.5 longitude[1]=31.5 u10[21001]=9.96921e+36 m/s 
     155;    time[1] latitude[1]=-28.5 longitude[0]=30.5 u10[21350]=9.96921e+36 m/s 
     156;    time[1] latitude[1]=-28.5 longitude[1]=31.5 u10[21351]=9.96921e+36 m/s 
     157; 
     158; make it work : pb on loholt1 idl6: 
     159; 
     160; .. parsed-literal:: 
     161; 
     162;    Writing fields: 
     163;    u10[longitude,latitude,time]=u10out:u10_attr; v10[longitude,latitude,time]=v10out:v10_attr; longitude[]=xlon:lon_attr; latitude[]=ylat:lat_attr; tt[*time]=tt:time_attr  @ globattr 
     164;    % NCDF_VARPUT: Operation Failed, bad file (6) or variable [0] id ? 
     165;                   (NC_ERROR=-31) 
     166;    % Stop encountered: INTERP_ERAI_WS_1989_2009    1 
    159167; 
    160168; check OUTMASK_IND and SET_OUTMSKVAL added to call_interp2d call 
  • trunk/src/interp_olr_30n30s.pro

    r180 r203  
    6868; ======== 
    6969; 
    70 ; :: 
    71 ; 
    72 .compile file_interp 
    73 yyyymmddb = 20000101L 
    74 yyyymmdde = 20001231L 
    75 result = interp_olr_30n30s(yyyymmddb, yyyymmdde) 
    76 print, result 
     70; .. code-block:: idl 
     71; 
     72 .compile file_interp 
     73  yyyymmddb = 20000101L 
     74  yyyymmdde = 20001231L 
     75  result = interp_olr_30n30s(yyyymmddb, yyyymmdde) 
     76  print, result 
    7777; 
    7878; TODO 
     
    8181; hard coded attributes for time origine 
    8282; 
    83 ; how can we avoid this message :: 
    84 ; 
    85 ;   % initncdf: the zaxis was not found..., check the use of ZAXISNAME keyword if you want to find one... 
     83; how can we avoid this message : 
     84; 
     85; .. parsed-literal:: 
     86; 
     87;    % initncdf: the zaxis was not found..., check the use of ZAXISNAME keyword if you want to find one... 
    8688; 
    8789; I think we do not need any zaxis 
    8890; 
    89 ; strange second value [1] in the file produced on cratos idl 7 20110812:: 
    90 ; 
    91 ;   $ ncdump $PROJECT_OD/olr_oafluxgrid_30n30s_19890101_20091231.nc 
    92 ;     olr = 
     91; strange second value [1] in the file produced on cratos idl 7 20110812: 
     92; 
     93; .. code-block:: bash 
     94; 
     95;    ncdump $PROJECT_OD/olr_oafluxgrid_30n30s_19890101_20091231.nc 
     96; 
     97; .. parsed-literal:: 
     98; 
     99;    olr = 
    93100;     1e+20, 1, 258.15, 264.882, 271.614, 273.8116, 271.4748, 269.138, 266.6868, 
    94101; 
     
    172179nparam = N_PARAMS() 
    173180IF (nparam NE 2) THEN BEGIN 
    174    ras = report(['Incorrect number of arguments.' $ 
     181    ras = report(['Incorrect number of arguments.' $ 
    175182         + '!C' $ 
    176183         + 'Usage : ' + usage]) 
    177    return, result 
     184    return, result 
    178185ENDIF 
    179186; 
     
    183190CASE project_id_env OF 
    184191    ''  :  BEGIN 
    185      msg = 'eee : ${PROJECT_ID} is not defined' 
    186      ras = report(msg) 
    187      return, result 
    188            END 
    189  ELSE: BEGIN 
    190      msg = 'iii : ${PROJECT_ID} is ' + project_id_env 
    191      ras = report(msg) 
    192        END 
     192        msg = 'eee : ${PROJECT_ID} is not defined' 
     193        ras = report(msg) 
     194        return, result 
     195    END 
     196    ELSE: BEGIN 
     197        msg = 'iii : ${PROJECT_ID} is ' + project_id_env 
     198        ras = report(msg) 
     199    END 
    193200ENDCASE 
    194201; 
     
    197204; existence and protection of ${PROJECT_ID} 
    198205IF (FILE_TEST(iodirin, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
    199    msg = 'eee : the directory' + iodirin  + ' is not accessible.' 
    200    ras = report(msg) 
    201    return, result 
     206    msg = 'eee : the directory' + iodirin  + ' is not accessible.' 
     207    ras = report(msg) 
     208    return, result 
    202209ENDIF 
    203210; 
     
    210217fullfilename_msk = isafile(iodirin + filename_msk, NEW=0, /MUST_EXIST) 
    211218IF fullfilename_msk[0] EQ '' THEN BEGIN 
    212    msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 
    213    ras = report(msg) 
    214    return, result 
     219    msg = 'eee : the file ' + fullfilename_msk + ' was not found.' 
     220    ras = report(msg) 
     221    return, result 
    215222ENDIF 
    216223; 
     
    223230fullfilename = isafile(iodirin + filename, NEW=0, /MUST_EXIST) 
    224231IF fullfilename[0] EQ '' THEN BEGIN 
    225    msg = 'eee : the file ' + fullfilename + ' was not found.' 
    226    ras = report(msg) 
    227    return, result 
     232    msg = 'eee : the file ' + fullfilename + ' was not found.' 
     233    ras = report(msg) 
     234    return, result 
    228235ENDIF 
    229236; 
    230237; test if ${PROJECT_OD} defined 
    231238CASE project_od_env OF 
    232   '' : BEGIN 
     239    '' : BEGIN 
    233240         msg = 'eee : ${PROJECT_OD} is not defined' 
    234241         ras = report(msg) 
    235242       return, result 
    236        END 
    237   ELSE: BEGIN 
     243    END 
     244    ELSE: BEGIN 
    238245          msg = 'iii : ${PROJECT_OD} is ' + project_od_env 
    239246          ras = report(msg) 
    240         END 
     247    END 
    241248 ENDCASE 
    242249; 
     
    256263; in order to avoid unexpected overwritten 
    257264IF ((FILE_TEST(fullfilename_out) EQ 1)  AND (project_overwrite EQ 0)) THEN BEGIN 
    258    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
    259    ras = report(msg) 
    260    return, result 
     265    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     266    ras = report(msg) 
     267    return, result 
    261268ENDIF 
    262269; 
     
    294301for jt=0,jptin-1 do begin 
    295302; 
    296   print, 'Interpolation jt=',jt,' / ',jptin-1 
    297   tab_olr=reform(olrin[*,*,jt]) 
    298 ; 
    299   olrout[*,*,jt]=call_interp2d(tab_olr,lonin,latin,mskin $ 
     303    print, 'Interpolation jt=',jt,' / ',jptin-1 
     304    tab_olr=reform(olrin[*,*,jt]) 
     305; 
     306    olrout[*,*,jt]=call_interp2d(tab_olr,lonin,latin,mskin $ 
    300307      , lonout,latout,method='bilinear'  $ 
    301308      , OUTMASK_IND=mskout, SET_OUTMSKVAL=mskout) 
    302   olrout[*,*,jt]=olrout[*,*,jt]*mskout+(1.-mskout)*1.e20 
     309    olrout[*,*,jt]=olrout[*,*,jt]*mskout+(1.-mskout)*1.e20 
    303310; 
    304311endfor 
  • trunk/src/lwdown_clark.pro

    r181 r203  
    4343@common 
    4444; 
    45 eps=.97                 ; emissivity of sea-water 
    46 sig=5.67e-8             ; Stefan-Boltzman constant (W/m2/K4) 
    47 Ts=(sst+273.15)         ; SST in K 
    48 Ta=(tair+273.15)        ; Tair in K 
     45eps=.97            ; emissivity of sea-water 
     46sig=5.67e-8        ; Stefan-Boltzman constant (W/m2/K4) 
     47Ts=(sst+273.15)     ; SST in K 
     48Ta=(tair+273.15)      ; Tair in K 
    4949q=qair/1000.            ; specific humidity (kg/kg) 
    50 r=q/(1-q)               ; Mixing ratio 
     50r=q/(1-q)        ; Mixing ratio 
    5151ea=ps*r/(r+.62197)      ; Specific humidity into vapor pressure 
    5252; 
  • trunk/src/lwnet_clark.pro

    r181 r203  
    4444@common 
    4545; 
    46 eps=.97                 ; emissivity of sea-water 
    47 sig=5.67e-8             ; Stefan-Boltzman constant (W/m2/K4) 
    48 Ts=(sst+273.15)         ; SST in K 
    49 Ta=(tair+273.15)        ; Tair in K 
     46eps=.97            ; emissivity of sea-water 
     47sig=5.67e-8        ; Stefan-Boltzman constant (W/m2/K4) 
     48Ts=(sst+273.15)     ; SST in K 
     49Ta=(tair+273.15)      ; Tair in K 
    5050q=qair/1000.            ; specific humidity (kg/kg) 
    51 r=q/(1-q)               ; Mixing ratio 
     51r=q/(1-q)        ; Mixing ratio 
    5252ea=ps*r/(r+.62197)      ; Specific humidity into vapor pressure 
    5353; 
  • trunk/src/lwr_correction_ncdf.pro

    r180 r203  
    7272; ======== 
    7373; 
    74 ; :: 
    75 ; 
    76 yyyymmddb = 20000101L 
    77 yyyymmdde = 20001231L 
    78 result = lwr_correction_ncdf(yyyymmddb, yyyymmdde) 
    79 print, result 
     74; .. code-block:: idl 
     75; 
     76  yyyymmddb = 20000101L 
     77  yyyymmdde = 20001231L 
     78  result = lwr_correction_ncdf(yyyymmddb, yyyymmdde) 
     79  print, result 
    8080; 
    8181; TODO 
     
    138138;- 
    139139function lwr_correction_ncdf $ 
    140          , yyyymmddb $ 
    141          , yyyymmdde 
     140, yyyymmddb $ 
     141, yyyymmdde 
    142142; 
    143143;++compile_opt idl2, strictarrsubs, logical_predicate 
     
    165165; test if ${PROJECT_OD} defined 
    166166CASE project_od_env OF 
    167   '' : BEGIN 
     167    '' : BEGIN 
    168168         msg = 'eee : ${PROJECT_OD} is not defined' 
    169169         ras = report(msg) 
    170170       return, result 
    171        END 
    172   ELSE: BEGIN 
     171    END 
     172    ELSE: BEGIN 
    173173          msg = 'iii : ${PROJECT_OD} is ' + project_od_env 
    174174          ras = report(msg) 
    175         END 
    176  ENDCASE 
     175    END 
     176ENDCASE 
    177177; 
    178178; check if output data will be possible 
     
    181181; existence and protection for reading 
    182182IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
    183    msg = 'eee : the directory' + iodirout  + ' is not accessible.' 
    184    ras = report(msg) 
    185    return, result 
     183    msg = 'eee : the directory' + iodirout  + ' is not accessible.' 
     184    ras = report(msg) 
     185    return, result 
    186186ENDIF 
    187187; 
     
    201201fullfilename = isafile(iodirout + filename, NEW=0, /MUST_EXIST) 
    202202IF fullfilename[0] EQ '' THEN BEGIN 
    203    msg = 'eee : the file ' + fullfilename + ' was not found.' 
    204    ras = report(msg) 
    205    return, result 
     203    msg = 'eee : the file ' + fullfilename + ' was not found.' 
     204    ras = report(msg) 
     205    return, result 
    206206ENDIF 
    207207; 
     
    211211; in order to avoid unexpected overwritten 
    212212IF ((FILE_TEST(fullfilename_out) EQ 1)  AND (project_overwrite EQ 0)) THEN BEGIN 
    213    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
    214    ras = report(msg) 
    215    return, result 
     213    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     214    ras = report(msg) 
     215    return, result 
    216216ENDIF 
    217217; 
     
    237237; 
    238238for jt=0,jpt-1 do begin 
    239   jtt=(time[jt]-julday(1,1,yea[jt])) < 364 
    240   t=reform(lwr_mean[*,*]) 
    241   lwr_m[*,*,jt]=t 
     239    jtt=(time[jt]-julday(1,1,yea[jt])) < 364 
     240    t=reform(lwr_mean[*,*]) 
     241    lwr_m[*,*,jt]=t 
    242242endfor 
    243243help, lwr_m 
  • trunk/src/oaflux_mask_30n30s.pro

    r180 r203  
    7373; ======== 
    7474; 
    75 ; :: 
    76 ; 
    77 result = oaflux_mask_30n30s() 
     75; .. code-block:: idl 
     76; 
     77  result = oaflux_mask_30n30s() 
    7878; 
    7979; TODO 
  • trunk/src/paper01/fig1/fig1_no_obs_map.pro

    r182 r203  
    5555; ======== 
    5656; 
    57 ; :: 
    58 ; 
    59 fig1_no_obs_map 
     57; .. code-block:: idl 
     58; 
     59  fig1_no_obs_map 
    6060; 
    6161; TODO 
  • trunk/src/paper01/fig10/fig10_swr_correction.pro

    r182 r203  
    3838; ======== 
    3939; 
    40 ; :: 
     40; .. code-block:: idl 
    4141; 
    42 @project_init 
    43 fig10_swr_correction 
     42  @project_init 
     43  fig10_swr_correction 
    4444; 
    4545; TODO 
  • trunk/src/paper01/fig11/swr_isccp_tropflux_correlation_fig10.pro

    r182 r203  
    4949; ======== 
    5050; 
    51 ; :: 
     51; .. code-block:: idl 
    5252; 
    53 swr_isccp_tropflux_correlation_fig10 
     53  swr_isccp_tropflux_correlation_fig10 
    5454; 
    5555; TODO 
  • trunk/src/paper01/fig11/swr_isccp_tropflux_new_v1.pro

    r182 r203  
    5454; ======== 
    5555; 
    56 ; :: 
    57 ; 
    58 swr_isccp_tropflux_new_v1 
     56; .. code-block:: idl 
     57; 
     58  swr_isccp_tropflux_new_v1 
    5959; 
    6060; TODO 
  • trunk/src/paper01/fig12/swr_statistics_map_2000_2009_v50.pro

    r182 r203  
    4040; ======== 
    4141; 
    42 ; :: 
    43 ; 
    44 swr_statistics_map_2000_2009_v50 
     42; .. code-block:: idl 
     43; 
     44  swr_statistics_map_2000_2009_v50 
    4545; 
    4646; TODO 
  • trunk/src/paper01/fig13/net_flux_validation_scatter_2000_2007.pro

    r182 r203  
    7171; ======== 
    7272; 
    73 ; :: 
    74 ; 
    75 date1 = 19890101L 
    76 date2 = 20091231L 
    77 net_flux_validation_scatter_2000_2007, date1, date2 
     73; .. code-block:: idl 
     74; 
     75  date1 = 19890101L 
     76  date2 = 20091231L 
     77  net_flux_validation_scatter_2000_2007, date1, date2 
    7878; 
    7979; TODO 
  • trunk/src/paper01/fig14/as_validation_net_1994_95_v10.pro

    r182 r203  
    5252; ======== 
    5353; 
    54 ; :: 
    55 ; 
    56 as_validation_net_1994_95_v10 
     54; .. code-block:: idl 
     55; 
     56  as_validation_net_1994_95_v10 
    5757; 
    5858; TODO 
  • trunk/src/paper01/fig14/coare_validation_net_1992_93_all_v10.pro

    r182 r203  
    5454; ======== 
    5555; 
    56 ; :: 
    57 ; 
    58 coare_validation_net_1992_93_all_v10 
     56; .. code-block:: idl 
     57; 
     58  coare_validation_net_1992_93_all_v10 
    5959; 
    6060; TODO 
  • trunk/src/paper01/fig14/stratus_validation_net_2001_2002_all_v10.pro

    r182 r203  
    5454; ======== 
    5555; 
    56 ; :: 
    57 ; 
    58 stratus_validation_net_2001_2002_all_v10 
     56; .. code-block:: idl 
     57; 
     58  stratus_validation_net_2001_2002_all_v10 
    5959; 
    6060; TODO 
  • trunk/src/paper01/fig14/subdctn_cs_validation_net_1991_93_all_v10.pro

    r182 r203  
    5454; ======== 
    5555; 
    56 ; :: 
    57 ; 
    58 subdctn_cs_validation_net_1991_93_all_v10 
     56; .. code-block:: idl 
     57; 
     58  subdctn_cs_validation_net_1991_93_all_v10 
    5959; 
    6060; TODO 
  • trunk/src/paper01/fig14/subdctn_ses_validation_net_1991_93_all_v10.pro

    r182 r203  
    5454; ======== 
    5555; 
    56 ; :: 
    57 ; 
    58 subdctn_ses_validation_net_1991_93_all_v10 
     56; .. code-block:: idl 
     57; 
     58  subdctn_ses_validation_net_1991_93_all_v10 
    5959; 
    6060; TODO 
  • trunk/src/paper01/fig14/subdctn_sws_validation_net_1991_93_all_v10.pro

    r182 r203  
    5454; ======== 
    5555; 
    56 ; :: 
    57 ; 
    58 subdctn_sws_validation_net_1991_93_all_v10 
     56; .. code-block:: idl 
     57; 
     58  subdctn_sws_validation_net_1991_93_all_v10 
    5959; 
    6060; TODO 
  • trunk/src/paper01/fig14/whots_validation_net_2004_2007_all_v10.pro

    r182 r203  
    5454; ======== 
    5555; 
    56 ; :: 
    57 ; 
    58 whots_validation_net_2004_2007_all_v10 
     56; .. code-block:: idl 
     57; 
     58  whots_validation_net_2004_2007_all_v10 
    5959; 
    6060; TODO 
  • trunk/src/paper01/fig15/fig15_timeseries_mjo.pro

    r182 r203  
    4444; ======== 
    4545; 
    46 ; :: 
    47 ; 
    48 fig15_timeseries_mjo 
     46; .. code-block:: idl 
     47; 
     48  fig15_timeseries_mjo 
    4949; 
    5050; TODO 
  • trunk/src/paper01/fig16/fig16_timeseries_nino3.pro

    r182 r203  
    5050; ======== 
    5151; 
    52 ; :: 
    53 ; 
    54 fig16_timeseries_nino3 
     52; .. code-block:: idl 
     53; 
     54  fig16_timeseries_nino3 
    5555; 
    5656; TODO 
  • trunk/src/paper01/fig2/fig2_timeline_diagram.pro

    r182 r203  
    4949; ======== 
    5050; 
    51 ; :: 
    52 ; 
    53 fig2_timeline_diagram 
     51; .. code-block:: idl 
     52; 
     53  fig2_timeline_diagram 
    5454; 
    5555; TODO 
    5656; ==== 
    5757; 
    58 ; make it work on cratos and loholt1:: 
     58; make it work on cratos and loholt1: 
     59; 
     60; .. parsed-literal:: 
    5961; 
    6062;    % Error: 
  • trunk/src/paper01/fig2/read_lh.pro

    r182 r203  
    4040; ======== 
    4141; 
    42 ; :: 
     42; .. code-block:: idl 
    4343; 
    44 csite = '8s67e' 
    45 date1 = 19890101L 
    46 date2 = 20091231L 
    47 nsmooth = 1. 
    48 read_lh, csite, date1, date2, nsmooth, lh 
     44  csite = '8s67e' 
     45  date1 = 19890101L 
     46  date2 = 20091231L 
     47  nsmooth = 1. 
     48  read_lh, csite, date1, date2, nsmooth, lh 
    4949; 
    5050; TODO 
  • trunk/src/paper01/fig2/read_lw.pro

    r182 r203  
    3838; ======== 
    3939; 
    40 ; :: 
     40; .. code-block:: idl 
    4141; 
    42 csite = '8s67e' 
    43 date1 = 19890101L 
    44 date2 = 20091231L 
    45 box = [249.500,250.500,-0.500000,0.500000] 
    46 read_lw, csite, date1, date2, box, lw 
     42  csite = '8s67e' 
     43  date1 = 19890101L 
     44  date2 = 20091231L 
     45  box = [249.500,250.500,-0.500000,0.500000] 
     46  read_lw, csite, date1, date2, box, lw 
    4747; 
    4848; TODO 
  • trunk/src/paper01/fig2/read_sw.pro

    r182 r203  
    3838; ======== 
    3939; 
    40 ; :: 
     40; .. code-block:: idl 
    4141; 
    42 csite = '8s67e' 
    43 date1 = 19890101L 
    44 date2 = 20091231L 
    45 box = ++ 
    46 read_sw, csite, date1, date2, box, sw 
     42  csite = '8s67e' 
     43  date1 = 19890101L 
     44  date2 = 20091231L 
     45  box = ++ 
     46  read_sw, csite, date1, date2, box, sw 
    4747; 
    4848; TODO 
  • trunk/src/paper01/fig2/time_lec.pro

    r182 r203  
    1212; ======== 
    1313; 
    14 ; :: 
     14; .. code-block:: idl 
    1515; 
    1616;    fi = ++ 
  • trunk/src/paper01/fig2/x_site_location.pro

    r182 r203  
    1515; ======== 
    1616; 
    17 ; :: 
     17; .. code-block:: idl 
    1818; 
    19 ;   site = ++ 
    20 ;   result = x_site_location(site) 
     19;    site = ++ 
     20;    result = x_site_location(site) 
    2121; 
    2222; SEE ALSO 
  • trunk/src/paper01/fig2/y_site_location.pro

    r182 r203  
    1515; ======== 
    1616; 
    17 ; :: 
     17; .. code-block:: idl 
    1818; 
    19 ;   site = ++ 
    20 ;   result = y_site_location(site) 
     19;    site = ++ 
     20;    result = y_site_location(site) 
    2121; 
    2222; SEE ALSO 
  • trunk/src/paper01/fig3/air_validation_scatter_2000_2009_v50.pro

    r182 r203  
    5858; ======== 
    5959; 
    60 ; :: 
    61 ; 
    62 date1 = 20001001L 
    63 date2 = 20091231L 
    64 air_validation_scatter_2000_2009_v50, date1, date2 
     60; .. code-block:: idl 
     61; 
     62  date1 = 20001001L 
     63  date2 = 20091231L 
     64  air_validation_scatter_2000_2009_v50, date1, date2 
    6565; 
    6666; TODO 
  • trunk/src/paper01/fig3/q2m_validation_scatter_2000_2009_v50.pro

    r182 r203  
    5757; ======== 
    5858; 
    59 ; :: 
    60 ; 
    61 date1 = 20001001L 
    62 date2 = 20091231L 
    63 q2m_validation_scatter_2000_2009_v50, date1, date2 
     59; .. code-block:: idl 
     60; 
     61  date1 = 20001001L 
     62  date2 = 20091231L 
     63  q2m_validation_scatter_2000_2009_v50, date1, date2 
    6464; 
    6565; TODO 
  • trunk/src/paper01/fig3/read_variables_v2.pro

    r182 r203  
    5656; ======== 
    5757; 
    58 ; :: 
    59 ; 
    60 csite = ++ 
    61 ++ 
    62 read_variables_v2, csite, date1, date2, nsmooth, at, sw, rh, sst, wu, wv, ws, lh 
     58; .. code-block:: idl 
     59; 
     60  csite = ++ 
     61  ++ 
     62  read_variables_v2, csite, date1, date2, nsmooth, at, sw, rh, sst, wu, wv, ws, lh 
    6363; 
    6464; TODO 
  • trunk/src/paper01/fig3/sst_validation_scatter_2000_2009_v50.pro

    r182 r203  
    5353; ======== 
    5454; 
    55 ; :: 
    56 ; 
    57 date1 = 19890101L 
    58 date2 = 20091231L 
    59 sst_validation_scatter_2000_2009_v50, date1, date2 
     55; .. code-block:: idl 
     56; 
     57  date1 = 19890101L 
     58  date2 = 20091231L 
     59  sst_validation_scatter_2000_2009_v50, date1, date2 
    6060; 
    6161; TODO 
  • trunk/src/paper01/fig3/statistics_3var_v1.pro

    r182 r203  
    3131; ======== 
    3232; 
    33 ; :: 
     33; .. code-block:: idl 
    3434; 
    35 tao = ++ 
    36 ++ 
    37 statistics_3var_v1, tao, var1, var2, cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
     35  tao = ++ 
     36  ++ 
     37  statistics_3var_v1, tao, var1, var2, cor1, cor2, bias1, bias2, std1, std2, rmsd1, rmsd2 
    3838; 
    3939; EVOLUTIONS 
  • trunk/src/paper01/fig3/ws_validation_scatter_2000_2009_v50.pro

    r182 r203  
    5252; ======== 
    5353; 
    54 ; :: 
    55 ; 
    56 date1 = 19890101L 
    57 date2 = 20091231L 
    58 ws_validation_scatter_2000_2009_v50, date1, date2 
     54; .. code-block:: idl 
     55; 
     56  date1 = 19890101L 
     57  date2 = 20091231L 
     58  ws_validation_scatter_2000_2009_v50, date1, date2 
    5959; 
    6060; TODO 
  • trunk/src/paper01/fig4/fig4_met_var_correction_scatter.pro

    r182 r203  
    4040; ======== 
    4141; 
    42 ; :: 
    43 ; 
    44 fig4_met_var_correction_scatter 
     42; .. code-block:: idl 
     43; 
     44  fig4_met_var_correction_scatter 
    4545; 
    4646; TODO 
  • trunk/src/paper01/fig4/significance_test_99.pro

    r182 r203  
    2020; ======== 
    2121; 
    22 ; :: 
     22; .. code-block:: idl 
    2323; 
    24 @project_init 
    25 x = ++ 
    26 y = ++ 
    27 sig_value = ++ 
    28 significance_test_99, x, y, sig_value 
     24  @project_init 
     25  x = ++ 
     26  y = ++ 
     27  sig_value = ++ 
     28  significance_test_99, x, y, sig_value 
    2929; 
    3030; TODO 
  • trunk/src/paper01/fig5/fig5_gustiness_scatter.pro

    r182 r203  
    3636; ======== 
    3737; 
    38 ; :: 
     38; .. code-block:: idl 
    3939; 
    40 fig5_gustiness_scatter 
     40  fig5_gustiness_scatter 
    4141; 
    4242; TODO 
  • trunk/src/paper01/fig6/icoads_q2m_stats_paper.pro

    r182 r203  
    4242; ======== 
    4343; 
    44 ; :: 
    45 ; 
    46 icoads_q2m_stats_paper 
     44; .. code-block:: idl 
     45; 
     46  icoads_q2m_stats_paper 
    4747; 
    4848; TODO 
     
    143143list=0 
    144144for n=0, nn-1 do begin 
    145   x=lat_tao(n) 
    146   y=lon_tao(n) 
    147   dx=abs(reform(glamt-x)) 
    148   dy=abs(reform(gphit)-y) 
    149   ind=where((dx le 0.5) and (dy le 0.5)) 
    150   if (total(ind) ge 0.) then begin 
    151     list=[list,ind] 
    152   endif 
     145    x=lat_tao(n) 
     146    y=lon_tao(n) 
     147    dx=abs(reform(glamt-x)) 
     148    dy=abs(reform(gphit)-y) 
     149    ind=where((dx le 0.5) and (dy le 0.5)) 
     150    if (total(ind) ge 0.) then begin 
     151        list=[list,ind] 
     152    endif 
    153153endfor 
    154154; 
     
    158158mask=trop*0 
    159159for jt=0,jpt-1 do begin 
    160   t=reform(msk(*,*)) 
    161   mask(*,*,jt)=t 
     160    t=reform(msk(*,*)) 
     161    mask(*,*,jt)=t 
    162162endfor 
    163163; 
     
    180180; 
    181181statistics, param, trop, $ 
    182                  cor, bias, std, rmsd 
     182cor, bias, std, rmsd 
    183183print, cor, bias, std,  rmsd 
    184184cstat_trop=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') 
     
    187187; 
    188188statistics, param, oaf, $ 
    189                  cor, bias, std, rmsd 
     189cor, bias, std, rmsd 
    190190print, cor, bias, std,  rmsd 
    191191cstat_oaf=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') 
     
    194194; 
    195195statistics, param, erai, $ 
    196                  cor, bias, std, rmsd 
     196cor, bias, std, rmsd 
    197197print, cor, bias, std,  rmsd 
    198198cstat_erai=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') 
     
    201201; 
    202202statistics, param, ncep2, $ 
    203                  cor, bias, std, rmsd 
     203cor, bias, std, rmsd 
    204204print, cor, bias, std,  rmsd 
    205205cstat_ncep2=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') 
     
    208208; 
    209209statistics, param, ncep1, $ 
    210                  cor, bias, std, rmsd 
     210cor, bias, std, rmsd 
    211211print, cor, bias, std,  rmsd 
    212212cstat_ncep1=string(cor, bias, std, rmsd, format='(f4.2,2x,f6.3,2x,f4.2,1x,f6.2)') 
     
    226226; 
    227227pdf, param,trop,mio,mao,inx,mis,mas,iny, $ 
    228     pdf,xx,yy 
    229 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 
    230     title="q2m - ICOADS/TropFlux", small=[2,3,1] 
     228pdf,xx,yy 
     229scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 
     230title="q2m - ICOADS/TropFlux", small=[2,3,1] 
    231231xyouts, 10, 6, cstat_trop, charsize=1 
    232232xyouts, 10, 4, abs_trop, charsize=1 
    233233; 
    234234pdf, param,oaf,mio,mao,inx,mis,mas,iny, $ 
    235     pdf,xx,yy 
    236 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 
    237     title="q2m - ICOADS/OAFlux", small=[2,3,2] 
     235pdf,xx,yy 
     236scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 
     237title="q2m - ICOADS/OAFlux", small=[2,3,2] 
    238238xyouts, 10, 6, cstat_oaf, charsize=1 
    239239xyouts, 10, 4, abs_oaf, charsize=1 
    240240; 
    241241pdf, param,erai,mio,mao,inx,mis,mas,iny, $ 
    242     pdf,xx,yy 
    243 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 
    244     title="q2m - ICOADS/ERAI", small=[2,3,3] 
     242pdf,xx,yy 
     243scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 
     244title="q2m - ICOADS/ERAI", small=[2,3,3] 
    245245xyouts, 10, 6, cstat_erai, charsize=1 
    246246xyouts, 10, 4, abs_erai, charsize=1 
    247247; 
    248248pdf, param,ncep2,mio,mao,inx,mis,mas,iny, $ 
    249     pdf,xx,yy 
    250 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 
    251     title="q2m - ICOADS/NCEP2", small=[2,3,4] 
     249pdf,xx,yy 
     250scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 
     251title="q2m - ICOADS/NCEP2", small=[2,3,4] 
    252252xyouts, 10, 6, cstat_ncep2, charsize=1 
    253253xyouts, 10, 4, abs_ncep2, charsize=1 
    254254; 
    255255pdf, param,ncep1,mio,mao,inx,mis,mas,iny, $ 
    256     pdf,xx,yy 
    257 scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 
    258     title="q2m - ICOADS/NCEP1", small=[2,3,5] 
     256pdf,xx,yy 
     257scontour, pdf,xx,yy ,/noer, charsize=1, nlevels=30,/fill, $ 
     258title="q2m - ICOADS/NCEP1", small=[2,3,5] 
    259259xyouts, 10, 6, cstat_ncep1, charsize=1 
    260260xyouts, 10, 4, abs_ncep1, charsize=1 
  • trunk/src/paper01/fig6/icoads_sst_stats_paper.pro

    r182 r203  
    4343; ======== 
    4444; 
    45 ; :: 
    46 ; 
    47 icoads_sst_stats_paper 
     45; .. code-block:: idl 
     46; 
     47  icoads_sst_stats_paper 
    4848; 
    4949; TODO 
  • trunk/src/paper01/fig6/icoads_t2m_stats_paper.pro

    r182 r203  
    4242; ======== 
    4343; 
    44 ; :: 
    45 ; 
    46 icoads_t2m_stats_paper 
     44; .. code-block:: idl 
     45; 
     46  icoads_t2m_stats_paper 
    4747; 
    4848; TODO 
  • trunk/src/paper01/fig6/icoads_ws_stats_paper.pro

    r182 r203  
    4343; ======== 
    4444; 
    45 ; :: 
    46 ; 
    47 icoads_ws_stats_paper 
     45; .. code-block:: idl 
     46; 
     47  icoads_ws_stats_paper 
    4848; 
    4949; TODO 
  • trunk/src/paper01/fig6/statistics.pro

    r182 r203  
    2929; ======== 
    3030; 
    31 ; :: 
     31; .. code-block:: idl 
    3232; 
    33 moor = ++ 
    34 ++ 
    35 statistics, moor, erai, cor, bias, std, rmsd 
     33  moor = ++ 
     34  ++ 
     35  statistics, moor, erai, cor, bias, std, rmsd 
    3636; 
    3737; TODO 
  • trunk/src/paper01/fig7/air_validation_scatter_2000_2009_basin.pro

    r182 r203  
    4747; ======== 
    4848; 
    49 ; :: 
    50 ; 
    51 date1 = 19890101L 
    52 date2 = 20091231L 
    53 air_validation_scatter_2000_2009_basin, date1, date2 
     49; .. code-block:: idl 
     50; 
     51  date1 = 19890101L 
     52  date2 = 20091231L 
     53  air_validation_scatter_2000_2009_basin, date1, date2 
    5454; 
    5555; TODO 
  • trunk/src/paper01/fig7/q2m_validation_scatter_2000_2009_basin.pro

    r182 r203  
    4747; ======== 
    4848; 
    49 ; :: 
    50 ; 
    51 date1 = 19890101L 
    52 date2 = 20091231L 
    53 q2m_validation_scatter_2000_2009_basin, date1, date2 
     49; .. code-block:: idl 
     50; 
     51  date1 = 19890101L 
     52  date2 = 20091231L 
     53  q2m_validation_scatter_2000_2009_basin, date1, date2 
    5454; 
    5555; TODO 
  • trunk/src/paper01/fig7/sst_validation_scatter_2000_2009_basin.pro

    r182 r203  
    4747; ======== 
    4848; 
    49 ; :: 
    50 ; 
    51 date1 = 19890101L 
    52 date2 = 20091231L 
    53 sst_validation_scatter_2000_2009_basin, date1, date2 
     49; .. code-block:: idl 
     50; 
     51  date1 = 19890101L 
     52  date2 = 20091231L 
     53  sst_validation_scatter_2000_2009_basin, date1, date2 
    5454; 
    5555; TODO 
  • trunk/src/paper01/fig7/ws_validation_scatter_2000_2009_basin.pro

    r182 r203  
    4848; ======== 
    4949; 
    50 ; :: 
    51 ; 
    52 date1 = 19890101L 
    53 date2 = 20091231L 
    54 ws_validation_scatter_2000_2009_basin, date1, date2 
     50; .. code-block:: idl 
     51; 
     52  date1 = 19890101L 
     53  date2 = 20091231L 
     54  ws_validation_scatter_2000_2009_basin, date1, date2 
    5555; 
    5656; TODO 
  • trunk/src/paper01/fig8/lhf_validation_scatter_2000_2009.pro

    r182 r203  
    5151; ======== 
    5252; 
    53 ; :: 
    54 ; 
    55 date1 = 19890101L 
    56 date2 = 20091231L 
    57 lhf_validation_scatter_2000_2009, date1, date2 
     53; .. code-block:: idl 
     54; 
     55  date1 = 19890101L 
     56  date2 = 20091231L 
     57  lhf_validation_scatter_2000_2009, date1, date2 
    5858; 
    5959; TODO 
  • trunk/src/paper01/fig8/shf_validation_scatter_2000_2009.pro

    r182 r203  
    5151; ======== 
    5252; 
    53 ; :: 
    54 ; 
    55 date1 = 19890101L 
    56 date2 = 20091231L 
    57 shf_validation_scatter_2000_2009, date1, date2 
     53; .. code-block:: idl 
     54; 
     55  date1 = 19890101L 
     56  date2 = 20091231L 
     57  shf_validation_scatter_2000_2009, date1, date2 
    5858; 
    5959; TODO 
  • trunk/src/paper01/fig9/lwr_validation_scatter_2000_2007.pro

    r182 r203  
    5454; ======== 
    5555; 
    56 ; :: 
    57 ; 
    58 date1 = 19890101L 
    59 date2 = 20091231L 
    60 lwr_validation_scatter_2000_2007, date1, date2 
     56; .. code-block:: idl 
     57; 
     58  date1 = 19890101L 
     59  date2 = 20091231L 
     60  lwr_validation_scatter_2000_2007, date1, date2 
    6161; 
    6262; TODO 
  • trunk/src/paper01/fig9/swr_validation_scatter_2000_2007.pro

    r182 r203  
    5353; ======== 
    5454; 
    55 ; :: 
    56 ; 
    57 date1 = 19890101L 
    58 date2 = 20091231L 
    59 swr_validation_scatter_2000_2007, date1, date2 
     55; .. code-block:: idl 
     56; 
     57  date1 = 19890101L 
     58  date2 = 20091231L 
     59  swr_validation_scatter_2000_2007, date1, date2 
    6060; 
    6161; TODO 
  • trunk/src/plot_tropflux.pro

    r181 r203  
    3636; ======== 
    3737; 
    38 ; To plot ++ of q2m from :file:`${PROJECT}/TropFlux_q2m_19890101_20091231.nc`:: 
     38; To plot ++ of q2m from :file:`${PROJECT}/TropFlux_q2m_19890101_20091231.nc`: 
     39; 
     40; .. code-block:: idl 
    3941; 
    4042;    @project_init 
     
    4749; :file:`${PROJECT_OD}/plot_tropflux_q2m_month.png` have been created. 
    4850; 
    49 ; Same idea for t2m from :file:`${PROJECT}/TropFlux_t2m_19890101_20091231.nc`:: 
     51; Same idea for t2m from :file:`${PROJECT}/TropFlux_t2m_19890101_20091231.nc`: 
     52; 
     53; .. code-block:: idl 
    5054; 
    5155;    @project_init 
     
    5357;    status = plot_tropflux(tropflux_varname) 
    5458; 
    55 ; Same idea for sst from :file:`${PROJECT}/TropFlux_sst_19890101_20091231.nc`:: 
     59; Same idea for sst from :file:`${PROJECT}/TropFlux_sst_19890101_20091231.nc`: 
     60; 
     61; .. code-block:: idl 
    5662; 
    5763;    @project_init 
     
    5965;    status = plot_tropflux(tropflux_varname) 
    6066; 
    61 ; Same idea for ws from :file:`${PROJECT}/TropFlux_ws_19890101_20091231.nc`:: 
     67; Same idea for ws from :file:`${PROJECT}/TropFlux_ws_19890101_20091231.nc`: 
     68; 
     69; .. code-block:: idl 
    6270; 
    6371;    @project_init 
     
    6573;    status = plot_tropflux(tropflux_varname) 
    6674;  
    67 ; Same idea for swr from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`:: 
     75; Same idea for swr from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`: 
     76; 
     77; .. code-block:: idl 
    6878; 
    6979;    @project_init 
     
    7181;    status = plot_tropflux(tropflux_varname) 
    7282; 
    73 ; Same idea for lwr from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`:: 
     83; Same idea for lwr from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`: 
     84; 
     85; .. code-block:: idl 
    7486; 
    7587;    @project_init 
     
    7789;    status = plot_tropflux(tropflux_varname) 
    7890; 
    79 ; Same idea for lhf from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`:: 
     91; Same idea for lhf from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`: 
     92; 
     93; .. code-block:: idl 
    8094; 
    8195;    @project_init 
     
    8397;    status = plot_tropflux(tropflux_varname) 
    8498; 
    85 ; Same idea for shf from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`:: 
     99; Same idea for shf from :file:`${PROJECT}/TropFlux_19890101_20091231.nc`: 
     100; 
     101; .. code-block:: idl 
    86102; 
    87103;    @project_init 
  • trunk/src/project_init.pro

    r163 r203  
    1414; .. note:: 
    1515; 
    16 ;    **project_overwrite** is here set to ``0`` : Existing files won't be  
    17 ;    overwritten. It might be set  
     16;    **project_overwrite** is here set to ``0`` : Existing files won't be 
     17;    overwritten. It might be set 
    1818;    to ``1`` when you want to overwrite existing files in IDL process. 
    1919; 
    20 ; It ++:: 
     20; It ++: 
    2121; 
    22 ;   $ idl -startupfile project_init.pro 
     22; .. code-block:: bash 
    2323; 
    24 ; or:: 
     24;    idl -startupfile project_init.pro 
    2525; 
    26 ;   $ idl -IDL_STARTUP project_init.pro 
     26; or: 
    2727; 
    28 ; or:: 
     28; .. code-block:: bash 
    2929; 
    30 ;  $ IDL 
    31 ;  IDL> @project_init 
     30;    idl -IDL_STARTUP project_init.pro 
     31; 
     32; or: 
     33; 
     34; .. code-block:: idl 
     35; 
     36;    @project_init 
    3237; 
    3338; SEE ALSO 
     
    5055; $URL$ 
    5156; 
    52 ; - fplod 20120319  
     57; - fplod 20120319 
    5358; 
    5459;   * define a overwrite status 
  • trunk/src/project_profile.sh

    r184 r203  
    1313# ======== 
    1414# 
    15 # Online usage:: 
    16 # 
    17 #  $ . ./project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir -idl_cmd idl_cmd 
    18 # 
    19 # In ${HOME}/.profile, add the following line:: 
    20 # 
    21 #  . project_profile.sh -d directory  -i indir -o outdir -t tempdir -s saxo_dir -idl_cmd idl_cmd 
     15# Online usage: 
     16# 
     17# .. code-block:: bash 
     18# 
     19#    . ./project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir -idl_cmd idl_cmd 
     20# 
     21# In ${HOME}/.profile, add the following line: 
     22# 
     23# .. code-block:: bash 
     24# 
     25#    . project_profile.sh -d directory  -i indir -o outdir -t tempdir -s saxo_dir -idl_cmd idl_cmd 
    2226# 
    2327# DESCRIPTION 
     
    4751# IDL_STARTUP is set to tell IDL where find tools. 
    4852# 
    49 # If :option:`idl_cmd` is used, **idl_cmd** will be used as the IDL command  
    50 # when launched from scripts.  
    51 # By default, ${IDL_CMD} is set to `idl`.  
     53# If :option:`idl_cmd` is used, **idl_cmd** will be used as the IDL command 
     54# when launched from scripts. 
     55# By default, ${IDL_CMD} is set to `idl`. 
    5256# 
    5357# FER_GO is completed with ${PROJECT}/src/ and ${PROJECT}/src/test/. 
     
    6468# ======== 
    6569# 
    66 # For fplod, on halios.locean-ipsl.upmc.fr using gdl (to be tested):: 
    67 # 
    68 #  $ cd /usr/home/fplod/incas/tropflux/tropflux_ws/ 
    69 #  $ . ./src/project_profile.sh \ 
     70# For fplod, on halios.locean-ipsl.upmc.fr using gdl (to be tested): 
     71# 
     72# .. code-block:: bash 
     73# 
     74#    cd /usr/home/fplod/incas/tropflux/tropflux_ws/ 
     75#    . ./src/project_profile.sh \ 
    7076#    -d $(pwd) \ 
    7177#    -i /usr/temp/${LOGNAME}/tropflux_d/ \ 
     
    7581#    -idl_cmd gdl 
    7682# 
    77 # For fplod on cratos.locean-ipsl.umpc.fr using idl 7.0:: 
    78 # 
    79 #  $ cd ${HOME}/incas/tropflux/tropflux_ws/ 
    80 #  $ . ./src/project_profile.sh \ 
     83# For fplod on cratos.locean-ipsl.umpc.fr using idl 7.0: 
     84# 
     85# .. code-block:: bash 
     86# 
     87#    cd ${HOME}/incas/tropflux/tropflux_ws/ 
     88#    . ./src/project_profile.sh \ 
    8189#    -d $(pwd) \ 
    8290#    -i /usr/temp/${LOGNAME}/tropflux_d/ \ 
     
    8694#    -idl_cmd idl70 
    8795# 
    88 # For pinsard on camelot.ipsl.polytechnique.fr or merlin15-c.climserv to use  
    89 # idl6.4:: 
    90 # 
    91 #  $ cd ${HOME}/tropflux/ 
    92 #  $ . ./src/project_profile.sh \ 
     96# For pinsard on camelot.ipsl.polytechnique.fr or merlin15-c.climserv to use 
     97# idl6.4: 
     98# 
     99# .. code-block:: bash 
     100# 
     101#    cd ${HOME}/tropflux/ 
     102#    . ./src/project_profile.sh \ 
    93103#   -d $(pwd) \ 
    94104#   -i /homedata/${LOGNAME}/tropflux_d/ \ 
     
    125135# - fplod 20111104T130726Z cratos (Linux) 
    126136# 
    127 #   * add $PROJECT/src/test to FER_GO 
     137#   * add ${PROJECT}/src/test to FER_GO 
    128138# 
    129139# - fplod 20111010T072623Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    150160system=$(uname) 
    151161case "${system}" in 
    152    AIX|IRIX64) 
    153       echo " www : no specific posix checking" 
    154    ;; 
    155    *) 
    156       set -o posix 
    157    ;; 
     162    AIX|IRIX64) 
     163        echo " www : no specific posix checking" 
     164    ;; 
     165    *) 
     166        set -o posix 
     167    ;; 
    158168esac 
    159169unset system 
     
    173183while [ ${#} -gt 0 ] 
    174184do 
    175    case ${1} in 
    176       -d) 
    177          # directory for application choosen by user (see svn checkout command used) 
    178          directory=${2} 
    179          shift 
    180       ;; 
    181       -i) 
    182          # directory for inputs choosen by user 
    183          indir=${2} 
    184          shift 
    185       ;; 
    186       -o) 
    187          # directory for outputs choosen by user 
    188          outdir=${2} 
    189          shift 
    190       ;; 
    191       -t) 
    192          # directory for temporary outputs choosen by user 
    193          tempdir=${2} 
    194          shift 
    195       ;; 
    196       -s) 
    197          # directory for SAXO tools 
    198          saxo_dir=${2} 
    199          shift 
    200       ;; 
    201       -idl_cmd) 
    202         # command for idl 
    203         idl_cmd=${2} 
    204         shift 
    205       ;; 
    206       *) 
    207          # other choice 
    208          echo "eee : unknown option ${1}" 
    209          echo "${usage}" 
    210          # nb : no exit because this file should be launched by login process 
    211       ;; 
    212    esac 
    213    # next flag 
    214    shift 
     185    case ${1} in 
     186        -d) 
     187            # directory for application choosen by user (see svn checkout command used) 
     188            directory=${2} 
     189            shift 
     190        ;; 
     191        -i) 
     192            # directory for inputs choosen by user 
     193            indir=${2} 
     194            shift 
     195        ;; 
     196        -o) 
     197            # directory for outputs choosen by user 
     198            outdir=${2} 
     199            shift 
     200        ;; 
     201        -t) 
     202            # directory for temporary outputs choosen by user 
     203            tempdir=${2} 
     204            shift 
     205        ;; 
     206        -s) 
     207            # directory for SAXO tools 
     208            saxo_dir=${2} 
     209            shift 
     210        ;; 
     211        -idl_cmd) 
     212            # command for idl 
     213            idl_cmd=${2} 
     214            shift 
     215        ;; 
     216        *) 
     217            # other choice 
     218            echo "eee : unknown option ${1}" 
     219            echo "${usage}" 
     220            # nb : no exit because this file should be launched by login process 
     221        ;; 
     222    esac 
     223    # next flag 
     224    shift 
    215225done 
    216226unset usage 
     
    219229if [ ! -d ${directory} ] 
    220230then 
    221    echo " eee : ${directory} not found" 
    222    # nb : no exit because this file should be launched by login process 
     231    echo " eee : ${directory} not found" 
     232    # nb : no exit because this file should be launched by login process 
    223233fi 
    224234# 
     
    226236if [ ! -x ${directory} ] 
    227237then 
    228    echo " eee : ${directory} not reachable" 
    229    # nb : no exit because this file should be launched by login process 
     238    echo " eee : ${directory} not reachable" 
     239    # nb : no exit because this file should be launched by login process 
    230240fi 
    231241# 
     
    241251if [ ${test_path} -ne 0 ] 
    242252then 
    243    PATH=${suppath}:${PATH} 
    244    export PATH 
     253    PATH=${suppath}:${PATH} 
     254    export PATH 
    245255else 
    246    # option bavarde oui/non pas encore implantée ++ 
    247    echo "${command} : iii : ${suppath} already in \${PATH}" 
     256    # option bavarde oui/non pas encore implantée ++ 
     257    echo "${command} : iii : ${suppath} already in \${PATH}" 
    248258fi 
    249259unset test_path 
     
    256266if [ ${test_manpath} -ne 0 ] 
    257267then 
    258    MANPATH=${suppath}:${MANPATH} 
    259    export MANPATH 
     268    MANPATH=${suppath}:${MANPATH} 
     269    export MANPATH 
    260270else 
    261    # option bavarde oui/non pas encore implantée ++ 
    262    echo "${command} : iii : ${suppath} already in \${MANPATH}" 
     271    # option bavarde oui/non pas encore implantée ++ 
     272    echo "${command} : iii : ${suppath} already in \${MANPATH}" 
    263273fi 
    264274unset test_manpath 
     
    270280if [ ! -d ${PROJECT_LOG} ] 
    271281then 
    272    mkdir -p ${PROJECT_LOG} 
    273    status=${?} 
    274    if [ ${status} -ne 0 ] 
    275    then 
    276       echo "${command} : eee : can not create \${PROJECT_LOG}" 
    277       # nb : no exit because this file should be launched by login process 
    278    else 
    279       echo "${command} : iii : creation of \${PROJECT_LOG}" 
    280    fi 
    281    unset status 
     282    mkdir -p ${PROJECT_LOG} 
     283    status=${?} 
     284    if [ ${status} -ne 0 ] 
     285    then 
     286        echo "${command} : eee : can not create \${PROJECT_LOG}" 
     287        # nb : no exit because this file should be launched by login process 
     288    else 
     289        echo "${command} : iii : creation of \${PROJECT_LOG}" 
     290    fi 
     291    unset status 
    282292fi 
    283293# check for permission on PROJECT_LOG 
    284294if [ ! -x ${PROJECT_LOG} ] 
    285295then 
    286    echo " eee : ${PROJECT_LOG} not reachable" 
    287    # nb : no exit because this file should be launched by login process 
     296    echo " eee : ${PROJECT_LOG} not reachable" 
     297    # nb : no exit because this file should be launched by login process 
    288298fi 
    289299# 
     
    291301if [ ! -w ${PROJECT_LOG} ] 
    292302then 
    293    echo " eee : ${PROJECT_LOG} not writable" 
    294    # nb : no exit because this file shouldreachable be launched by login process 
     303    echo " eee : ${PROJECT_LOG} not writable" 
     304    # nb : no exit because this file shouldreachable be launched by login process 
    295305fi 
    296306# 
     
    304314if [ ! -d ${PROJECT_ID} ] 
    305315then 
    306    mkdir -p ${PROJECT_ID} 
    307    echo "${command} : iii : creation of \${PROJECT_ID}" 
     316    mkdir -p ${PROJECT_ID} 
     317    echo "${command} : iii : creation of \${PROJECT_ID}" 
    308318fi 
    309319# check for permission on PROJECT_ID 
    310320if [ ! -x ${PROJECT_ID} ] 
    311321then 
    312    echo " eee : ${PROJECT_ID} not reachable" 
    313    # nb : no exit because this file should be launched by login process 
     322    echo " eee : ${PROJECT_ID} not reachable" 
     323    # nb : no exit because this file should be launched by login process 
    314324fi 
    315325# 
     
    325335if [ ! -x ${PROJECT_OD} ] 
    326336then 
    327    echo " eee : ${PROJECT_OD} not reachable" 
    328    # nb : no exit because this file should be launched by login process 
     337    echo " eee : ${PROJECT_OD} not reachable" 
     338    # nb : no exit because this file should be launched by login process 
    329339fi 
    330340if [ ! -w ${PROJECT_OD} ] 
    331341then 
    332    echo " eee : ${PROJECT_OD} not writable" 
    333    # nb : no exit because this file should be launched by login process 
     342    echo " eee : ${PROJECT_OD} not writable" 
     343    # nb : no exit because this file should be launched by login process 
    334344fi 
    335345# 
  • trunk/src/q2m_correction_ncdf.pro

    r180 r203  
    6969; ======== 
    7070; 
    71 ; :: 
    72 ; 
    73 yyyymmddb = 20000101L 
    74 yyyymmdde = 20001231L 
    75 result = q2m_correction_ncdf(yyyymmddb, yyyymmdde) 
    76 print, result 
     71; .. code-block:: idl 
     72; 
     73  yyyymmddb = 20000101L 
     74  yyyymmdde = 20001231L 
     75  result = q2m_correction_ncdf(yyyymmddb, yyyymmdde) 
     76  print, result 
    7777; 
    7878; TODO 
    7979; ==== 
    8080; 
    81 ; make it work :: 
    82 ; 
    83 ;   Writing fields: 
    84 ;   q2m[longitude,latitude,time*]=q2m_new:q2m_attr; longitude[]=lon:lon_attr; latitude[]=lat:lat_attr; time[]=timein:time_attr  @ globattr 
    85 ;   % NCDF_DIMDEF: Unable to create dimension. (NC_ERROR=-59) 
    86 ;   % NCDF_VARDEF: Unable to define variable, bad dimension id . 
    87 ;   % NCDF_VARPUT: Variable Inquiry failed, -1 is not a valid variable id. 
    88 ;   % Stop encountered: Q2M_CORRECTION_NCDF    1 
    89 ;         /.autofs/lodyc/incas/fplod/tropflux/tropflux_ws/src/q2m_correction_ncdf.pro 
     81; make it work : 
     82; 
     83; .. parsed-literal: 
     84; 
     85;    Writing fields: 
     86;    q2m[longitude,latitude,time*]=q2m_new:q2m_attr; longitude[]=lon:lon_attr; latitude[]=lat:lat_attr; time[]=timein:time_attr  @ globattr 
     87;    % NCDF_DIMDEF: Unable to create dimension. (NC_ERROR=-59) 
     88;    % NCDF_VARDEF: Unable to define variable, bad dimension id . 
     89;    % NCDF_VARPUT: Variable Inquiry failed, -1 is not a valid variable id. 
     90;    % Stop encountered: Q2M_CORRECTION_NCDF    1 
     91;              /.autofs/lodyc/incas/fplod/tropflux/tropflux_ws/src/q2m_correction_ncdf.pro 
    9092; 
    9193; No way ... NaNf also in this output !! 
     
    128130function q2m_correction_ncdf $ 
    129131         , yyyymmddb $ 
    130         , yyyymmdde 
     132        , yyyymmdde 
    131133; 
    132134;++compile_opt idl2, strictarrsubs, logical_predicate 
  • trunk/src/qsat.pro

    r181 r203  
    1515; ======== 
    1616; 
    17 ; :: 
     17; .. code-block:: idl 
    1818; 
    19 T = +todo+ 
    20 P = +todo+ 
    21 result = qsat(T,P) 
     19  T = +todo+ 
     20  P = +todo+ 
     21  result = qsat(T,P) 
    2222; 
    2323; TODO 
  • trunk/src/rh_to_spechum.pro

    r181 r203  
    1616; ======== 
    1717; 
    18 ; :: 
     18; .. code-block:: idl 
    1919; 
    20 rh = +todo+ 
    21 ta = +todo+ 
    22 P = +todo+ 
    23 result = rh_to_spechum(rh,ta,P) 
     20  rh = +todo+ 
     21  ta = +todo+ 
     22  P = +todo+ 
     23  result = rh_to_spechum(rh,ta,P) 
    2424; 
    2525; TODO 
  • trunk/src/sst_correction_ncdf.pro

    r180 r203  
    7777; ======== 
    7878; 
    79 ; :: 
    80 ; 
    81 yyyymmddb = 20000101L 
    82 yyyymmdde = 20001231L 
    83 result = sst_correction_ncdf(yyyymmddb, yyyymmdde) 
    84 print, result 
     79; .. code-block:: idl 
     80; 
     81  yyyymmddb = 20000101L 
     82  yyyymmdde = 20001231L 
     83  result = sst_correction_ncdf(yyyymmddb, yyyymmdde) 
     84  print, result 
    8585; 
    8686; TODO 
     
    9090; reach end whithout error but with bad values (9.96921e+36 on time and sst, nb timestep  5716 
    9191; 
    92 ; see commands:: 
    93 ; 
    94 ;     ncks -v sst  -d time,0,1 -d latitude,0,1 -d longitude,0,1 /homedata/pinsard/tropflux_d/TropFlux_sst_19890101_20091231.nc 
    95 ; 
    96 ; very strange value of time on lohlot1 idl6 but not always and not always at the same indices !!:: 
     92; see commands: 
     93; 
     94; .. code-block:: bash 
     95; 
     96;    ncks -v sst  -d time,0,1 -d latitude,0,1 -d longitude,0,1 /homedata/pinsard/tropflux_d/TropFlux_sst_19890101_20091231.nc 
     97; 
     98; very strange value of time on lohlot1 idl6 but not always and not always at the same indices !!: 
     99; 
     100; .. parsed-literal:: 
    97101; 
    98102;    print, time[7080:7090] 
     
    101105;       2454617.5 
    102106; 
    103 ; while :: 
    104 ; 
    105 ;   $ ncks -H -C -v time -d time,7080,7090 ${PROJECT_ID}/20c3m_erai_sstk_TROP_1989_2009.nc 
    106 ;   time[7080]=450432 
    107 ;   time[7081]=450456 
    108 ;   time[7082]=450480 
    109 ;   time[7083]=450504 
    110 ;   time[7084]=450528 
    111 ;   time[7085]=450552 
    112 ;   time[7086]=450576 
    113 ;   time[7087]=450600 
    114 ;   time[7088]=450624 
    115 ;   time[7089]=450648 
    116 ;   time[7090]=450672 
     107; while : 
     108; 
     109; .. code-block:: bash 
     110; 
     111;    ncks -H -C -v time -d time,7080,7090 ${PROJECT_ID}/20c3m_erai_sstk_TROP_1989_2009.nc 
     112; 
     113; .. parsed-literal:: 
     114; 
     115;    time[7080]=450432 
     116;    time[7081]=450456 
     117;    time[7082]=450480 
     118;    time[7083]=450504 
     119;    time[7084]=450528 
     120;    time[7085]=450552 
     121;    time[7086]=450576 
     122;    time[7087]=450600 
     123;    time[7088]=450624 
     124;    time[7089]=450648 
     125;    time[7090]=450672 
    117126; 
    118127; and 
    119 ;   ncks -H -C -v time -d time,7080,7090 ${PROJECT_OD}/erai_sst_19890101_20091231_oafluxgrid.nc 
    120 ;   time[7080]=21325 
    121 ;   time[7081]=21326 
    122 ;   time[7082]=21327 
    123 ;   time[7083]=9.96920996839e+36 
    124 ;   time[7084]=9.96920996839e+36 
    125 ;   time[7085]=9.96920996839e+36 
    126 ;   time[7086]=9.96920996839e+36 
    127 ;   time[7087]=9.96920996839e+36 
    128 ;   time[7088]=9.96920996839e+36 
    129 ;   time[7089]=21334 
    130 ;   time[7090]=21335 
    131 ; 
    132 ; and :: 
    133 ; 
    134 ;   fplod@cratos$ ncks -H -C -v time -d time,7080,7090 ${PROJECT_OD}/erai_sst_19890101_20091231_oafluxgrid.nc 
    135 ;   time[7080]=21325 
    136 ;   time[7081]=21326 
    137 ;   time[7082]=21327 
    138 ;   time[7083]=21328 
    139 ;   time[7084]=21329 
    140 ;   time[7085]=21330 
    141 ;   time[7086]=21331 
    142 ;   time[7087]=21332 
    143 ;   time[7088]=21333 
    144 ;   time[7089]=21334 
    145 ;   time[7090]=21335 
     128; 
     129; .. code-block:: bash 
     130; 
     131;    ncks -H -C -v time -d time,7080,7090 ${PROJECT_OD}/erai_sst_19890101_20091231_oafluxgrid.nc 
     132; 
     133; .. parsed-literal:: 
     134; 
     135;    time[7080]=21325 
     136;    time[7081]=21326 
     137;    time[7082]=21327 
     138;    time[7083]=9.96920996839e+36 
     139;    time[7084]=9.96920996839e+36 
     140;    time[7085]=9.96920996839e+36 
     141;    time[7086]=9.96920996839e+36 
     142;    time[7087]=9.96920996839e+36 
     143;    time[7088]=9.96920996839e+36 
     144;    time[7089]=21334 
     145;    time[7090]=21335 
     146; 
     147;  and : 
     148; 
     149; .. code-block:: bash 
     150; 
     151;    fplod@cratos$ ncks -H -C -v time -d time,7080,7090 ${PROJECT_OD}/erai_sst_19890101_20091231_oafluxgrid.nc 
     152; 
     153; .. parsed-literal:: 
     154; 
     155;    time[7080]=21325 
     156;    time[7081]=21326 
     157;    time[7082]=21327 
     158;    time[7083]=21328 
     159;    time[7084]=21329 
     160;    time[7085]=21330 
     161;    time[7086]=21331 
     162;    time[7087]=21332 
     163;    time[7088]=21333 
     164;    time[7089]=21334 
     165;    time[7090]=21335 
    146166; 
    147167; coding rules 
     
    219239; test if ${PROJECT_OD} defined 
    220240CASE project_od_env OF 
    221   '' : BEGIN 
     241    '' : BEGIN 
    222242         msg = 'eee : ${PROJECT_OD} is not defined' 
    223243         ras = report(msg) 
    224244       return, result 
    225        END 
    226   ELSE: BEGIN 
     245    END 
     246    ELSE: BEGIN 
    227247          msg = 'iii : ${PROJECT_OD} is ' + project_od_env 
    228248          ras = report(msg) 
    229         END 
    230  ENDCASE 
     249    END 
     250ENDCASE 
    231251; 
    232252; check if output data will be possible 
     
    235255; existence and protection for reading 
    236256IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
    237    msg = 'eee : the directory' + iodirout  + ' is not accessible.' 
    238    ras = report(msg) 
    239    return, result 
     257    msg = 'eee : the directory' + iodirout  + ' is not accessible.' 
     258    ras = report(msg) 
     259    return, result 
    240260ENDIF 
    241261; 
     
    255275fullfilename = isafile(iodirout + filename, NEW=0, /MUST_EXIST) 
    256276IF fullfilename[0] EQ '' THEN BEGIN 
    257    msg = 'eee : the file ' + fullfilename + ' was not found.' 
    258    ras = report(msg) 
    259    return, result 
     277    msg = 'eee : the file ' + fullfilename + ' was not found.' 
     278    ras = report(msg) 
     279    return, result 
    260280ENDIF 
    261281; 
     
    265285; in order to avoid unexpected overwritten 
    266286IF ((FILE_TEST(fullfilename_out) EQ 1)  AND (project_overwrite EQ 0)) THEN BEGIN 
    267    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
    268    ras = report(msg) 
    269    return, result 
     287    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     288    ras = report(msg) 
     289    return, result 
    270290ENDIF 
    271291; 
     
    296316; 
    297317for jt=0,jpt-1 do begin 
    298   jtt=(time[jt]-julday(1,1,yea[jt])) < 364 
    299   t=reform(sst_mean[*,*]) 
    300   sst_m[*,*,jt]=t 
     318    jtt=(time[jt]-julday(1,1,yea[jt])) < 364 
     319    t=reform(sst_mean[*,*]) 
     320    sst_m[*,*,jt]=t 
    301321endfor 
    302322help, sst_m 
  • trunk/src/t2m_correction_ncdf.pro

    r180 r203  
    7575; ======== 
    7676; 
    77 ; :: 
    78 ; 
    79 yyyymmddb = 20000101L 
    80 yyyymmdde = 20001231L 
    81 result = t2m_correction_ncdf(yyyymmddb, yyyymmdde) 
    82 print, result 
     77; .. code-block:: idl 
     78; 
     79  yyyymmddb = 20000101L 
     80  yyyymmdde = 20001231L 
     81  result = t2m_correction_ncdf(yyyymmddb, yyyymmdde) 
     82  print, result 
    8383; 
    8484; TODO 
     
    8686; 
    8787; note .5 in time value ... is this correct ? do others files 
    88 ; present the same feature ?:: 
    89 ; 
    90 ;    $ ncks -v time -d time,0,1 /usr/work/incas/fplod/tropflux_d/TropFlux_t2m_19890101_20091231.nc 
     88; present the same feature ? 
     89; 
     90; .. code-block:: bash 
     91: 
     92;    ncks -v time -d time,0,1 /usr/work/incas/fplod/tropflux_d/TropFlux_t2m_19890101_20091231.nc 
     93; 
     94; .. parsed-literal:: 
     95; 
    9196;    time: type NC_DOUBLE, 1 dimension, 3 attributes, chunked? no, compressed? no, packed? no, ID = 3 
    9297;    time RAM size is 7670*sizeof(NC_DOUBLE) = 7670*8 = 61360 bytes 
     
    107112; hard coded correction values 
    108113; 
    109 ; check side effect of replacement of read_ncdf by ncdf_lec :: 
    110 ; 
    111 ;    Probleme d'adequation entre les tailles du domaine nx*ny*jpt 350*60*1 et du tableau 350*60*7670 
     114; check side effect of replacement of read_ncdf by ncdf_lec : 
     115; Probleme d'adequation entre les tailles du domaine nx*ny*jpt 350*60*1 et du tableau 350*60*7670 
    112116; 
    113117; hard coded attributes 
     
    171175;- 
    172176function t2m_correction_ncdf $ 
    173          , yyyymmddb $ 
    174          , yyyymmdde 
     177, yyyymmddb $ 
     178, yyyymmdde 
    175179; 
    176180;++compile_opt idl2, strictarrsubs, logical_predicate 
  • trunk/src/test/read.py

    r31 r203  
    2828======== 
    2929 
    30 :: 
     30.. code-block:: bash 
    3131 
    32  $ read.py 
     32   read.py 
    3333 
    3434SEE ALSO 
     
    8686   # controle print 
    8787   print zdata.units 
    88    # plot  
     88   # plot 
    8989   xlabel('xlabel+todo') 
    9090   ylabel('ylabel+todo') 
  • trunk/src/time_axe_modif_TropFlux.pro

    r181 r203  
    3131; ======== 
    3232; 
    33 ; :: 
     33; .. code-block:: idl 
    3434; 
    35 time_axe_modif_tropflux 
     35  time_axe_modif_tropflux 
    3636; 
    3737; TODO 
  • trunk/src/time_axe_modif_tropflux_1d_1989_2010.pro

    r181 r203  
    3333; ======== 
    3434; 
    35 ; :: 
     35; .. code-block:: idl 
    3636; 
    37 time_axe_modif_tropflux_1d_1989_2010 
     37  time_axe_modif_tropflux_1d_1989_2010 
    3838; 
    3939; TODO 
  • trunk/src/tropflux.pro

    r181 r203  
    127127; ======== 
    128128; 
    129 ; :: 
    130 ; 
    131 yyyymmddb = 20000101L 
    132 yyyymmdde = 20001231L 
    133 result = tropflux(yyyymmddb, yyyymmdde) 
    134 print, result 
     129; .. code-block:: idl 
     130; 
     131  yyyymmddb = 20000101L 
     132  yyyymmdde = 20001231L 
     133  result = tropflux(yyyymmddb, yyyymmdde) 
     134  print, result 
    135135; 
    136136; TODO 
     
    141141; compare time between all inputs after reading 
    142142; 
    143 ; make it work :: 
     143; make it work : 
     144; 
     145; .. parsed-literal:: 
    144146; 
    145147;     % Compiled module: EXTRAPOLATE. 
     
    154156;     % Program caused arithmetic error: Floating illegal operand 
    155157; 
    156 ; the incriminated line is :: 
    157 ; 
    158 ;     tab=fltarr(jpi,jpj)+!values.f_nan & x=reform(y(*,1)) & tab(ocean)=x & m=fi    nite(tab) & tab=extrapolate(tab,m) & lwr(*,*,jt)=tab*msk+valmask*(1-msk) 
     158; the incriminated line is : 
     159; 
     160; .. code-block:: idl 
     161; 
     162;    tab=fltarr(jpi,jpj)+!values.f_nan & x=reform(y(*,1)) & tab(ocean)=x & m=fi    nite(tab) & tab=extrapolate(tab,m) & lwr(*,*,jt)=tab*msk+valmask*(1-msk) 
    159163; 
    160164; to make progress I DO NOT extrapolate anymore lwr, sen and lat 
    161165; !!!!! must be reactivated 
    162166; 
    163 ; when I DO NOT extrapolate lwr, sen and lat , program end with :: 
    164 ; 
    165 ;     Written to 
    166 ;     !/usr/work/incas/fplod/tropflux_d/TropFlux_19890101_20091231_coarev3.nc 
    167 ;     ------------------------- 
    168 ;     % Program caused arithmetic error: Floating divide by 0 
    169 ;     % Program caused arithmetic error: Floating underflow 
    170 ;     % Program caused arithmetic error: Floating overflow 
    171 ;     % Program caused arithmetic error: Floating illegal operand 
     167; when I DO NOT extrapolate lwr, sen and lat , program end with : 
     168; 
     169; .. parsed-literal:: 
     170; 
     171;    Written to 
     172;    !/usr/work/incas/fplod/tropflux_d/TropFlux_19890101_20091231_coarev3.nc 
     173;    ------------------------- 
     174;    % Program caused arithmetic error: Floating divide by 0 
     175;    % Program caused arithmetic error: Floating underflow 
     176;    % Program caused arithmetic error: Floating overflow 
     177;    % Program caused arithmetic error: Floating illegal operand 
    172178; 
    173179; explain why :func:`lwdown_clark` is not used 
     
    175181; check if K or °C in input 
    176182; 
    177 ; get rid of:: 
    178 ; 
    179 ;   % date 1: 19880101 is not found in the time axis. 
    180 ; 
    181 ; why :: 
    182 ; 
    183 ;   da1=19880101 
     183; get rid of: 
     184; 
     185; .. parsed-literal:: 
     186; 
     187;    % date 1: 19880101 is not found in the time axis. 
     188; 
     189; why : 
     190; 
     191; .. code-block:: idl 
     192; 
     193;    da1=19880101 
    184194; 
    185195; 1st date 19890101 no ? 
    186196; 
    187 ; why da1-1 (with da1=19880101) when reading gustiness file :: 
    188 ; 
    189 ;   wg=read_ncdf('wg',da1-1,da2,file=fullfilename_wg,/nostr) 
     197; why da1-1 (with da1=19880101) when reading gustiness file : 
     198; 
     199; .. code-block:: idl 
     200; 
     201;    wg=read_ncdf('wg',da1-1,da2,file=fullfilename_wg,/nostr) 
    190202; 
    191203; coding rules 
     
    258270; 
    259271function tropflux $ 
    260          , yyyymmddb $ 
    261          , yyyymmdde 
     272, yyyymmddb $ 
     273, yyyymmdde 
    262274; 
    263275compile_opt idl2, strictarrsubs, logical_predicate 
  • trunk/src/tropflux.sh

    r191 r203  
    1313# ======== 
    1414# 
    15 # :: 
    16 # 
    17 $ tropflux.sh [-f] -b yyyymmdd -e yyyymmdd 
     15# .. code-block:: bash 
     16# 
     17  tropflux.sh [-f] -b yyyymmdd -e yyyymmdd 
    1818# 
    1919# DESCRIPTION 
     
    6262# 
    6363# You already used :ref:`get_erai.sh` to get ERAI data, etc., 
    64 # during [20000101, 20000302[ and you want to produce NetCDF files:: 
    65 # 
    66 #   $ tropflux.sh -b 20000101 -e 20000302 
    67 # 
    68 # A more global example:: 
    69 # 
    70 #   $ tropflux.sh -b 19890101 -e 20091231 
    71 # 
    72 # And look at log file with :: 
    73 # 
    74 #  $ tlogd.sh tropflux 
     64# during [20000101, 20000302[ and you want to produce NetCDF files: 
     65# 
     66# .. code-block:: bash 
     67# 
     68#    tropflux.sh -b 20000101 -e 20000302 
     69# 
     70# A more global example: 
     71# 
     72# .. code-block:: bash 
     73# 
     74#    tropflux.sh -b 19890101 -e 20091231 
     75# 
     76# And look at log file with : 
     77# 
     78# .. code-block:: bash 
     79# 
     80#    tlogd.sh tropflux 
    7581# 
    7682# and of course on files in ${PROJECT_ID}. 
     
    184190system=$(uname) 
    185191case "${system}" in 
    186    AIX|IRIX64) 
    187      echo "${command} : www : no specific posix checking" 
    188      date_cmd=date 
    189    ;; 
    190    Darwin) 
    191      set -o posix 
    192      date_cmd=gdate 
    193    ;; 
    194    Linux) 
    195      set -o posix 
    196      date_cmd=date 
    197    ;; 
    198    *) 
    199     set -o posix 
    200    ;; 
     192    AIX|IRIX64) 
     193        echo "${command} : www : no specific posix checking" 
     194        date_cmd=date 
     195    ;; 
     196    Darwin) 
     197        set -o posix 
     198        date_cmd=gdate 
     199    ;; 
     200    Linux) 
     201        set -o posix 
     202        date_cmd=date 
     203    ;; 
     204    *) 
     205        set -o posix 
     206    ;; 
    201207esac 
    202208unset system 
     
    225231if [ ${#} -lt ${minargcount} ] 
    226232then 
    227    echo "${command} : eee : not enought arguments" 
    228    echo "${usage}" 
    229    exit 1 
     233    echo "${command} : eee : not enought arguments" 
     234    echo "${usage}" 
     235    exit 1 
    230236fi 
    231237unset minargcount 
     
    233239while [ ${#} -gt 0 ] 
    234240do 
    235    case ${1} in 
    236      -b) 
    237         # first date to process 
    238         yyyymmddb=${2} 
    239         shift 
    240      ;; 
    241      -e) 
    242         # last date to process 
    243         yyyymmdde=${2} 
    244         shift 
    245      ;; 
    246      -f) 
    247         force=1 
    248      ;; 
    249      -h) 
    250         echo "${usage}" 
    251         exit 0 
    252      ;; 
    253      *) 
    254         # other choice 
    255         echo "${command} : eee : unknown option ${1}" 
    256         echo "${usage}" 
    257         exit 1 
    258      ;; 
    259    esac 
    260    # next flag 
    261    shift 
     241    case ${1} in 
     242        -b) 
     243            # first date to process 
     244            yyyymmddb=${2} 
     245            shift 
     246        ;; 
     247        -e) 
     248            # last date to process 
     249            yyyymmdde=${2} 
     250            shift 
     251        ;; 
     252        -f) 
     253            force=1 
     254        ;; 
     255        -h) 
     256            echo "${usage}" 
     257            exit 0 
     258        ;; 
     259        *) 
     260            # other choice 
     261            echo "${command} : eee : unknown option ${1}" 
     262            echo "${usage}" 
     263            exit 1 
     264        ;; 
     265    esac 
     266    # next flag 
     267    shift 
    262268done 
    263269unset usage 
     
    312318if [ ${status} -ne 0 ] 
    313319then 
    314    echo "${command} : eee : tool ${IDL_CMD} not found" 
    315    echo "${command} : eee : check project_profile.sh sequence" 
    316    exit 1 
     320    echo "${command} : eee : tool ${IDL_CMD} not found" 
     321    echo "${command} : eee : check project_profile.sh sequence" 
     322    exit 1 
    317323fi 
    318324unset status 
     
    322328if [ ! -w ${PROJECT_LOG} ] 
    323329then 
    324    echo "${command} : eee : ${PROJECT_LOG} not writable" 
    325    exit 1 
     330    echo "${command} : eee : ${PROJECT_LOG} not writable" 
     331    exit 1 
    326332fi 
    327333# 
     
    350356; define overwrite status 
    351357; set to 1 to overwrite existing files 
    352 project_overwrite = ${force}  
     358project_overwrite = ${force} 
    353359; define eraitype 
    354360eraitype=2 
     
    356362result = oaflux_mask_30n30s() 
    357363IF result < 0 THEN BEGIN 
    358    msg = 'eee : pb after oaflux_mask_30n30s ' + string(result) 
    359    err = report(msg) 
     364    msg = 'eee : pb after oaflux_mask_30n30s ' + string(result) 
     365    err = report(msg) 
    360366   exit 
    361367ENDIF 
    362368result = interp_erai_dewt(${yyyymmddb}, ${yyyymmdde}, eraitype) 
    363369IF result < 0 THEN BEGIN 
    364    msg = 'eee : pb after interp_erai_dewt ' + string(result) 
    365    err = report(msg) 
    366    exit 
     370    msg = 'eee : pb after interp_erai_dewt ' + string(result) 
     371    err = report(msg) 
     372    exit 
    367373ENDIF 
    368374result = interp_erai_lwr(${yyyymmddb}, ${yyyymmdde}, eraitype) 
    369375IF result < 0 THEN BEGIN 
    370    msg = 'eee : pb after interp_erai_lwr ' + string(result) 
    371    err = report(msg) 
    372    exit 
     376    msg = 'eee : pb after interp_erai_lwr ' + string(result) 
     377    err = report(msg) 
     378    exit 
    373379ENDIF 
    374380result = interp_erai_msl(${yyyymmddb}, ${yyyymmdde}, eraitype) 
    375381IF result < 0 THEN BEGIN 
    376    msg = 'eee : pb after interp_erai_msl ' + string(result) 
    377    err = report(msg) 
    378    exit 
     382    msg = 'eee : pb after interp_erai_msl ' + string(result) 
     383    err = report(msg) 
     384    exit 
    379385ENDIF 
    380386result = interp_erai_sst(${yyyymmddb}, ${yyyymmdde}, eraitype) 
    381387IF result < 0 THEN BEGIN 
    382    msg = 'eee : pb after interp_erai_sst ' + string(result) 
    383    err = report(msg) 
    384    exit 
     388    msg = 'eee : pb after interp_erai_sst ' + string(result) 
     389    err = report(msg) 
     390    exit 
    385391ENDIF 
    386392result = interp_erai_t2m(${yyyymmddb}, ${yyyymmdde}, eraitype) 
    387393IF result < 0 THEN BEGIN 
    388    msg = 'eee : pb after interp_erai_t2m ' + string(result) 
    389    err = report(msg) 
    390    exit 
     394    msg = 'eee : pb after interp_erai_t2m ' + string(result) 
     395    err = report(msg) 
     396    exit 
    391397ENDIF 
    392398result = interp_erai_ws(${yyyymmddb}, ${yyyymmdde}, eraitype) 
    393399IF result < 0 THEN BEGIN 
    394    msg = 'eee : pb after interp_erai_ws ' + string(result) 
    395    err = report(msg) 
    396    exit 
     400    msg = 'eee : pb after interp_erai_ws ' + string(result) 
     401    err = report(msg) 
     402    exit 
    397403ENDIF 
    398404result = interp_olr_30n30s(${yyyymmddb}, ${yyyymmdde}) 
    399405IF result < 0 THEN BEGIN 
    400    msg = 'eee : pb after interp_olr_30n30s ' + string(result) 
    401    err = report(msg) 
    402    exit 
     406    msg = 'eee : pb after interp_olr_30n30s ' + string(result) 
     407    err = report(msg) 
     408    exit 
    403409ENDIF 
    404410result = d2m_to_q2m_erai(${yyyymmddb}, ${yyyymmdde}) 
    405411IF result < 0 THEN BEGIN 
    406    msg = 'eee : pb after d2m_to_q2m_erai ' + string(result) 
    407    err = report(msg) 
    408    ;++Program caused arithmetic error: Floating overflow 
    409    ;++ Program caused arithmetic error: Floating illegal operand 
    410    ;++exit 
     412    msg = 'eee : pb after d2m_to_q2m_erai ' + string(result) 
     413    err = report(msg) 
     414    ;++Program caused arithmetic error: Floating overflow 
     415    ;++ Program caused arithmetic error: Floating illegal operand 
     416    ;++exit 
    411417ENDIF 
    412418result = tropflux_swr_dt(${yyyymmddb}, ${yyyymmdde}) 
    413419IF result < 0 THEN BEGIN 
    414    msg = 'eee : pb after tropflux_swr_dt ' + string(result) 
    415    err = report(msg) 
    416    exit 
     420    msg = 'eee : pb after tropflux_swr_dt ' + string(result) 
     421    err = report(msg) 
     422    exit 
    417423ENDIF 
    418424result = tropflux_swr_nrt(${yyyymmddb}, ${yyyymmdde}) 
    419425IF result < 0 THEN BEGIN 
    420    msg = 'eee : pb after tropflux_swr_nrt ' + string(result) 
    421    err = report(msg) 
    422    exit 
     426    msg = 'eee : pb after tropflux_swr_nrt ' + string(result) 
     427    err = report(msg) 
     428    exit 
    423429ENDIF 
    424430result = sst_correction_ncdf(${yyyymmddb}, ${yyyymmdde}) 
    425431IF result < 0 THEN BEGIN 
    426    msg = 'eee : pb after sst_correction_ncdf ' + string(result) 
    427    err = report(msg) 
    428    exit 
     432    msg = 'eee : pb after sst_correction_ncdf ' + string(result) 
     433    err = report(msg) 
     434    exit 
    429435ENDIF 
    430436result = cronin_gustiness_ncdf(${yyyymmddb}, ${yyyymmdde}) 
    431437IF result < 0 THEN BEGIN 
    432    msg = 'eee : pb after cronin_gustiness_ncdf ' + string(result) 
    433    err = report(msg) 
    434    exit 
     438    msg = 'eee : pb after cronin_gustiness_ncdf ' + string(result) 
     439    err = report(msg) 
     440    exit 
    435441ENDIF 
    436442result = tropflux_swr_blnd(${yyyymmddb}, ${yyyymmdde}) 
    437443IF result < 0 THEN BEGIN 
    438    msg = 'eee : pb after tropflux_swr_blnd ' + string(result) 
    439    err = report(msg) 
    440    exit 
     444    msg = 'eee : pb after tropflux_swr_blnd ' + string(result) 
     445    err = report(msg) 
     446    exit 
    441447ENDIF 
    442448result = lwr_correction_ncdf(${yyyymmddb}, ${yyyymmdde}) 
    443449IF result < 0 THEN BEGIN 
    444    msg = 'eee : pb after lwr_correction_ncdf ' + string(result) 
    445    err = report(msg) 
    446    exit 
     450    msg = 'eee : pb after lwr_correction_ncdf ' + string(result) 
     451    err = report(msg) 
     452    exit 
    447453ENDIF 
    448454result = q2m_correction_ncdf(${yyyymmddb}, ${yyyymmdde}) 
    449455IF result < 0 THEN BEGIN 
    450    msg = 'eee : pb after q2m_correction_ncdf ' + string(result) 
    451    err = report(msg) 
    452    exit 
     456    msg = 'eee : pb after q2m_correction_ncdf ' + string(result) 
     457    err = report(msg) 
     458    exit 
    453459ENDIF 
    454460result = t2m_correction_ncdf(${yyyymmddb}, ${yyyymmdde}) 
    455461IF result < 0 THEN BEGIN 
    456    msg = 'eee : pb after t2m_correction_ncdf ' + string(result) 
    457    err = report(msg) 
    458    exit 
     462    msg = 'eee : pb after t2m_correction_ncdf ' + string(result) 
     463    err = report(msg) 
     464    exit 
    459465ENDIF 
    460466result = ws_correction_ncdf(${yyyymmddb}, ${yyyymmdde}) 
    461467IF result < 0 THEN BEGIN 
    462    msg = 'eee : pb after ws_correction_ncdf ' + string(result) 
    463    err = report(msg) 
    464    exit 
     468    msg = 'eee : pb after ws_correction_ncdf ' + string(result) 
     469    err = report(msg) 
     470    exit 
    465471ENDIF 
    466472result = tropflux(${yyyymmddb}, ${yyyymmdde}) 
    467473IF result < 0 THEN BEGIN 
    468    msg = 'eee : pb after tropflux' + string(result) 
    469    err = report(msg) 
    470    exit 
     474    msg = 'eee : pb after tropflux' + string(result) 
     475    err = report(msg) 
     476    exit 
    471477ENDIF 
    472478result = tropflux_nrt_ncdf(${yyyymmddb}, ${yyyymmdde}) 
    473479IF result < 0 THEN BEGIN 
    474    msg = 'eee : pb after tropflux_nrt_ncdf' + string(result) 
    475    err = report(msg) 
    476    exit 
     480    msg = 'eee : pb after tropflux_nrt_ncdf' + string(result) 
     481    err = report(msg) 
     482    exit 
    477483ENDIF 
    478484result = tropflux_wind_stress(${yyyymmddb}, ${yyyymmdde}) 
    479485IF result < 0 THEN BEGIN 
    480    msg = 'eee : pb after tropflux_wind_stress' + string(result) 
    481    err = report(msg) 
    482    exit 
     486    msg = 'eee : pb after tropflux_wind_stress' + string(result) 
     487    err = report(msg) 
     488    exit 
    483489ENDIF 
    484490end 
     
    494500if [ ${status} -ne 0 ] 
    495501then 
    496    echo "${command} : eee: ${IDL_CMD} failed : ${status}" >> ${log} 2>&1 
    497    cat ${PROJECT}/src/tropflux_${$}.pro >> ${log} 2>&1 
    498    exit 1 
     502    echo "${command} : eee: ${IDL_CMD} failed : ${status}" >> ${log} 2>&1 
     503    cat ${PROJECT}/src/tropflux_${$}.pro >> ${log} 2>&1 
     504    exit 1 
    499505fi 
    500506rm ${PROJECT}/src/tropflux_${$}.pro 
  • trunk/src/tropflux_nrt_ncdf.pro

    r179 r203  
    6464; ======== 
    6565; 
    66 ; :: 
    67 ; 
    68 yyyymmddb = 20000101L 
    69 yyyymmdde = 20001231L 
    70 result = tropflux_nrt_ncdf(yyyymmddb, yyyymmdde) 
    71 print, result 
     66; .. code-block:: idl 
     67; 
     68  yyyymmddb = 20000101L 
     69  yyyymmdde = 20001231L 
     70  result = tropflux_nrt_ncdf(yyyymmddb, yyyymmdde) 
     71  print, result 
    7272; 
    7373; TODO 
     
    116116;- 
    117117function tropflux_nrt_ncdf $ 
    118          , yyyymmddb $ 
    119          , yyyymmdde 
     118, yyyymmddb $ 
     119, yyyymmdde 
    120120; 
    121121compile_opt idl2, strictarrsubs, logical_predicate 
  • trunk/src/tropflux_swr_blnd.pro

    r180 r203  
    7171; ======== 
    7272; 
    73 ; :: 
    74 ; 
    75 yyyymmddb = 20000101L 
    76 yyyymmdde = 20001231L 
    77 result = tropflux_swr_blnd(yyyymmddb, yyyymmdde) 
    78 print, result 
     73; .. code-block:: idl 
     74; 
     75  yyyymmddb = 20000101L 
     76  yyyymmdde = 20001231L 
     77  result = tropflux_swr_blnd(yyyymmddb, yyyymmdde) 
     78  print, result 
    7979; 
    8080; TODO 
     
    8383; handling date > 20071231 
    8484; 
    85 ; read_ncdf usage of yyyymmddb yyyymmdde  
     85; read_ncdf usage of yyyymmddb yyyymmdde 
    8686; 
    8787; get rid of timegen 
     
    125125;     even if uggly and understanted SAXO strange behaviour 
    126126; 
    127 ;     this resolve crash on cratos idl7:: 
    128 ; 
    129 ;       % Attempt to subscript SWR_DT with JT is out of range. 
    130 ; 
    131 ;     line:: 
     127;     this resolve crash on cratos idl7: 
     128; 
     129;     .. parsed-literal:: 
     130; 
     131;        % Attempt to subscript SWR_DT with JT is out of range. 
     132; 
     133;     line: 
     134; 
     135;     .. code-block:: idl 
    132136; 
    133137;        for jt=0,jpt-1 do swr_merged(*,*,jt)=swr_dt(*,*,jt)*a(jt)+(1-a(jt))*swr_nrt(*,*,jt) 
     
    135139;     problably because  6938+731=7669 and not 7670 when 
    136140;     :samp:`dt=read_ncdf('swr', 19890101, 20071231, file=fullfilename_dt,/nostr)` 
    137 ;     was used :: 
     141;     was used : 
     142;     .. parsed-literal:: 
     143; 
    138144; 
    139145;        DT              FLOAT     = Array[350, 60, 6938] 
     
    142148;        SWR_NRT         FLOAT     = Array[350, 60, 7670] 
    143149; 
    144 ;     nb jours 19890101-20071231:: 
    145 ; 
    146 ;        IDL>  print, julday(12,31,2007) - julday(01, 01, 1989) +1 
     150;     nb jours 19890101-20071231: 
     151; 
     152;     .. code-block:: idl 
     153; 
     154;        print, julday(12,31,2007) - julday(01, 01, 1989) +1 
    147155;        6939 
    148156; 
    149157;     et ncdump -h $PROJECT_OD/TropFlux_swr_19890101_20071231_DT.nc time = UNLIMITED ; // (6939 currently) 
    150158; 
    151 ;     nb jours 19890101-20091231:: 
    152 ; 
    153 ;        IDL>  print, julday(12,31,2009) - julday(01, 01, 1989) +1 
     159;     nb jours 19890101-20091231: 
     160; 
     161;     .. code-block:: idl 
     162; 
     163;        print, julday(12,31,2009) - julday(01, 01, 1989) +1 
    154164;        7670 
    155165; 
    156 ;     strange behaviour of read_ncdf ... see:: 
    157 ; 
    158 ;        IDL> fullfilename_dt='TropFlux_swr_19890101_20071231_DT.nc' 
    159 ;        IDL> dt=read_ncdf('swr', 19890100, 20071231, file=fullfilename_dt,/nostr) 
    160 ;        IDL> print, 'first time step (should crash with invalid date)', jul2date(time[0]) 
     166;     strange behaviour of read_ncdf ... see: 
     167; 
     168;     .. code-block:: idl 
     169; 
     170;        fullfilename_dt='TropFlux_swr_19890101_20071231_DT.nc' 
     171;        dt=read_ncdf('swr', 19890100, 20071231, file=fullfilename_dt,/nostr) 
     172;        print, 'first time step (should crash with invalid date)', jul2date(time[0]) 
    161173;        first time step (should be 19890101)       19890101. 
    162 ;        IDL> dt=read_ncdf('swr', 19890101, 20071231, file=fullfilename_dt,/nostr) 
    163 ;        IDL> print, 'first time step (should be 19890101)', jul2date(time[0]) 
     174;        dt=read_ncdf('swr', 19890101, 20071231, file=fullfilename_dt,/nostr) 
     175;        print, 'first time step (should be 19890101)', jul2date(time[0]) 
    164176;        first time step (should be 19890101)       19890102. 
    165177; 
     
    186198;- 
    187199function tropflux_swr_blnd $ 
    188          , yyyymmddb $ 
    189          , yyyymmdde 
     200, yyyymmddb $ 
     201, yyyymmdde 
    190202; 
    191203compile_opt idl2, strictarrsubs, logical_predicate 
     
    205217nparam = N_PARAMS() 
    206218IF (nparam NE 2) THEN BEGIN 
    207    ras = report(['Incorrect number of arguments.' $ 
     219    ras = report(['Incorrect number of arguments.' $ 
    208220         + '!C' $ 
    209221         + 'Usage : ' + usage]) 
    210    return, result 
     222    return, result 
    211223ENDIF 
    212224; 
    213225; test if ${PROJECT_OD} defined 
    214226CASE project_od_env OF 
    215   '' : BEGIN 
     227    '' : BEGIN 
    216228         msg = 'eee : ${PROJECT_OD} is not defined' 
    217229         ras = report(msg) 
    218230       return, result 
    219        END 
    220   ELSE: BEGIN 
     231    END 
     232    ELSE: BEGIN 
    221233          msg = 'iii : ${PROJECT_OD} is ' + project_od_env 
    222234          ras = report(msg) 
    223         END 
    224  ENDCASE 
     235    END 
     236ENDCASE 
    225237; 
    226238; check if output data will be possible 
     
    229241; existence and protection for reading 
    230242IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
    231    msg = 'eee : the directory' + iodirout  + ' is not accessible.' 
    232    ras = report(msg) 
    233    return, result 
     243    msg = 'eee : the directory' + iodirout  + ' is not accessible.' 
     244    ras = report(msg) 
     245    return, result 
    234246ENDIF 
    235247; 
     
    249261fullfilename_dt = isafile(iodirout + filename_dt, NEW=0, /MUST_EXIST) 
    250262IF fullfilename_dt[0] EQ '' THEN BEGIN 
    251    msg = 'eee : the file ' + fullfilename_dt + ' was not found.' 
    252    ras = report(msg) 
    253    return, result 
     263    msg = 'eee : the file ' + fullfilename_dt + ' was not found.' 
     264    ras = report(msg) 
     265    return, result 
    254266ENDIF 
    255267; 
     
    262274fullfilename_nrt = isafile(iodirout + filename_nrt, NEW=0, /MUST_EXIST) 
    263275IF fullfilename_nrt[0] EQ '' THEN BEGIN 
    264    msg = 'eee : the file ' + fullfilename_nrt + ' was not found.' 
    265    ras = report(msg) 
    266    return, result 
     276    msg = 'eee : the file ' + fullfilename_nrt + ' was not found.' 
     277    ras = report(msg) 
     278    return, result 
    267279ENDIF 
    268280; 
     
    275287fullfilename_wg = isafile(iodirout + filename_wg, NEW=0, /MUST_EXIST) 
    276288IF fullfilename_wg[0] EQ '' THEN BEGIN 
    277    msg = 'eee : the file ' + fullfilename_wg + ' was not found.' 
    278    ras = report(msg) 
    279    return, result 
     289    msg = 'eee : the file ' + fullfilename_wg + ' was not found.' 
     290    ras = report(msg) 
     291    return, result 
    280292ENDIF 
    281293; 
     
    285297; in order to avoid unexpected overwritten 
    286298IF ((FILE_TEST(fullfilename_out) EQ 1)  AND (project_overwrite EQ 0)) THEN BEGIN 
    287    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
    288    ras = report(msg) 
    289    return, result 
     299    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     300    ras = report(msg) 
     301    return, result 
    290302ENDIF 
    291303; 
  • trunk/src/tropflux_swr_dt.pro

    r180 r203  
    5858; ======== 
    5959; 
    60 ; :: 
    61 ; 
    62 yyyymmddb = 20000101L 
    63 yyyymmdde = 20001231L 
    64 result = tropflux_swr_dt(yyyymmddb, yyyymmdde) 
    65 print, result 
     60; .. code-block:: idl 
     61; 
     62  yyyymmddb = 20000101L 
     63  yyyymmdde = 20001231L 
     64  result = tropflux_swr_dt(yyyymmddb, yyyymmdde) 
     65  print, result 
    6666; 
    6767; TODO 
     
    126126;- 
    127127function tropflux_swr_dt $ 
    128          , yyyymmddb $ 
    129          , yyyymmdde 
     128, yyyymmddb $ 
     129, yyyymmdde 
    130130; 
    131131;++compile_opt idl2, strictarrsubs, logical_predicate 
  • trunk/src/tropflux_swr_nrt.pro

    r180 r203  
    1313; 
    1414; :file:`${PROJECT_OD}/TropFlux_swr_{yyyymmdd}_{yyyymmdd}_DT.nc` 
    15 ; containing  
     15; containing 
    1616; Corrected swr delay on OAFLUX grid 
    1717; has been produced by 
     
    6464; ======== 
    6565; 
    66 ; :: 
    67 ; 
    68 yyyymmddb = 20000101L 
    69 yyyymmdde = 20001231L 
    70 result = tropflux_swr_nrt(yyyymmddb, yyyymmdde) 
    71 print, result 
     66; .. code-block:: idl 
     67; 
     68  yyyymmddb = 20000101L 
     69  yyyymmdde = 20001231L 
     70  result = tropflux_swr_nrt(yyyymmddb, yyyymmdde) 
     71  print, result 
    7272; 
    7373; TODO 
     
    128128;- 
    129129function tropflux_swr_nrt $ 
    130          , yyyymmddb $ 
    131          , yyyymmdde 
     130, yyyymmddb $ 
     131, yyyymmdde 
    132132; 
    133133compile_opt idl2, strictarrsubs, logical_predicate 
     
    155155; test if ${PROJECT_OD} defined 
    156156CASE project_od_env OF 
    157   '' : BEGIN 
     157    '' : BEGIN 
    158158         msg = 'eee : ${PROJECT_OD} is not defined' 
    159159         ras = report(msg) 
    160160       return, result 
    161        END 
    162   ELSE: BEGIN 
     161    END 
     162    ELSE: BEGIN 
    163163          msg = 'iii : ${PROJECT_OD} is ' + project_od_env 
    164164          ras = report(msg) 
    165         END 
    166  ENDCASE 
     165    END 
     166ENDCASE 
    167167; check if output data will be possible 
    168168iodirout = isadirectory(project_od_env) 
     
    170170; existence and protection for reading 
    171171IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
    172    msg = 'eee : the directory' + iodirout  + ' is not accessible.' 
    173    ras = report(msg) 
    174    return, result 
     172    msg = 'eee : the directory' + iodirout  + ' is not accessible.' 
     173    ras = report(msg) 
     174    return, result 
    175175ENDIF 
    176176; 
     
    190190fullfilename_swr_dt = isafile(iodirout + filename_swr_dt, NEW=0, /MUST_EXIST) 
    191191IF fullfilename_swr_dt[0] EQ '' THEN BEGIN 
    192    msg = 'eee : the file ' + fullfilename_swr_dt + ' was not found.' 
    193    ras = report(msg) 
    194    return, result 
     192    msg = 'eee : the file ' + fullfilename_swr_dt + ' was not found.' 
     193    ras = report(msg) 
     194    return, result 
    195195ENDIF 
    196196; 
     
    203203fullfilename_olr = isafile(iodirout + filename_olr, NEW=0, /MUST_EXIST) 
    204204IF fullfilename_olr[0] EQ '' THEN BEGIN 
    205    msg = 'eee : the file ' + fullfilename_olr + ' was not found.' 
    206    ras = report(msg) 
    207    return, result 
     205    msg = 'eee : the file ' + fullfilename_olr + ' was not found.' 
     206    ras = report(msg) 
     207    return, result 
    208208ENDIF 
    209209; 
     
    213213; in order to avoid unexpected overwritten 
    214214IF ((FILE_TEST(fullfilename_out) EQ 1)  AND (project_overwrite EQ 0)) THEN BEGIN 
    215    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
    216    ras = report(msg) 
    217    return, result 
     215    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     216    ras = report(msg) 
     217    return, result 
    218218ENDIF 
    219219; 
     
    262262; 
    263263for j=0,n2-1 do begin 
    264   for i=0,n1-1 do begin 
    265     x=reform(swi[i,j,*]) 
    266     y=reform(olri[i,j,*]) 
    267     swi[i,j,*]=smooth(x,nsmooth) 
    268     olri[i,j,*]=smooth(y,nsmooth) 
    269   endfor 
     264    for i=0,n1-1 do begin 
     265        x=reform(swi[i,j,*]) 
     266        y=reform(olri[i,j,*]) 
     267        swi[i,j,*]=smooth(x,nsmooth) 
     268        olri[i,j,*]=smooth(y,nsmooth) 
     269    endfor 
    270270endfor 
    271271; 
     
    290290olrm=olr*0. 
    291291for jt=0,jpt-1 do begin 
    292   jtt=(time[jt]-julday(1,1,yea[jt])) < 364 
    293   swm[*,*,jt]=swi[*,*,jtt] 
    294   olrm[*,*,jt]=olri[*,*,jtt] 
     292    jtt=(time[jt]-julday(1,1,yea[jt])) < 364 
     293    swm[*,*,jt]=swi[*,*,jtt] 
     294    olrm[*,*,jt]=olri[*,*,jtt] 
    295295endfor 
    296296; 
  • trunk/src/tropflux_wind_stress.pro

    r183 r203  
    3737;     tropflux_wind_stress.pro 
    3838;   * hard coded st and en replaced by yyyymmddb and yyyymmdde parameters 
    39 ;   * add compile_opt  
     39;   * add compile_opt 
    4040;   * get rid of hard coded path 
    4141; 
     
    5050;- 
    5151function tropflux_wind_stress $ 
    52          , yyyymmddb $ 
    53          , yyyymmdde 
     52, yyyymmddb $ 
     53, yyyymmdde 
    5454; 
    5555compile_opt idl2, strictarrsubs, logical_predicate 
     
    128128; 
    129129ncfields = 'tau[longitude,latitude,time]=tau:tau_attr; ' $ 
    130           +'taux[longitude,latitude,time]=taux:taux_attr; ' $ 
    131           +'tauy[longitude,latitude,time]=tauy:tauy_attr; ' $ 
    132                       + 'longitude[]=xlon:lon_attr; ' $ 
    133                       + 'latitude[]=ylat:lat_attr; ' $ 
    134                       + 'time[*time]=time:time_attr ' $ 
    135                       + ' @ globattr' 
     130+'taux[longitude,latitude,time]=taux:taux_attr; ' $ 
     131+'tauy[longitude,latitude,time]=tauy:tauy_attr; ' $ 
     132+ 'longitude[]=xlon:lon_attr; ' $ 
     133+ 'latitude[]=ylat:lat_attr; ' $ 
     134+ 'time[*time]=time:time_attr ' $ 
     135+ ' @ globattr' 
    136136; 
    137137@ncdf_quickwrite 
  • trunk/src/ws_correction_ncdf.pro

    r180 r203  
    7272; ======== 
    7373; 
    74 ; :: 
    75 ; 
    76 yyyymmddb = 20000101L 
    77 yyyymmdde = 20001231L 
    78 result = ws_correction_ncdf(yyyymmddb, yyyymmdde) 
    79 print, result 
     74; .. code-block:: idl 
     75; 
     76  yyyymmddb = 20000101L 
     77  yyyymmdde = 20001231L 
     78  result = ws_correction_ncdf(yyyymmddb, yyyymmdde) 
     79  print, result 
    8080; 
    8181; TODO 
     
    127127;- 
    128128function ws_correction_ncdf $ 
    129          , yyyymmddb $ 
    130          , yyyymmdde 
     129, yyyymmddb $ 
     130, yyyymmdde 
    131131; 
    132132;++compile_opt idl2, strictarrsubs, logical_predicate 
     
    154154; test if ${PROJECT_OD} defined 
    155155CASE project_od_env OF 
    156   '' : BEGIN 
     156    '' : BEGIN 
    157157         msg = 'eee : ${PROJECT_OD} is not defined' 
    158158         ras = report(msg) 
    159        return, result 
    160        END 
    161   ELSE: BEGIN 
     159         return, result 
     160    END 
     161    ELSE: BEGIN 
    162162          msg = 'iii : ${PROJECT_OD} is ' + project_od_env 
    163163          ras = report(msg) 
    164         END 
     164    END 
    165165 ENDCASE 
    166166; 
     
    170170; existence and protection for reading 
    171171IF (FILE_TEST(iodirout, /DIRECTORY, /EXECUTABLE, /READ) EQ 0) THEN BEGIN 
    172    msg = 'eee : the directory' + iodirout  + ' is not accessible.' 
    173    ras = report(msg) 
    174    return, result 
     172    msg = 'eee : the directory' + iodirout  + ' is not accessible.' 
     173    ras = report(msg) 
     174    return, result 
    175175ENDIF 
    176176; 
     
    194194fullfilename = isafile(iodirout + filename, NEW=0, /MUST_EXIST) 
    195195IF fullfilename[0] EQ '' THEN BEGIN 
    196    msg = 'eee : the file ' + fullfilename + ' was not found.' 
    197    ras = report(msg) 
    198    return, result 
     196    msg = 'eee : the file ' + fullfilename + ' was not found.' 
     197    ras = report(msg) 
     198    return, result 
    199199ENDIF 
    200200; 
     
    208208; in order to avoid unexpected overwritten 
    209209IF ((FILE_TEST(fullfilename_out) EQ 1)  AND (project_overwrite EQ 0)) THEN BEGIN 
    210    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
    211    ras = report(msg) 
    212    return, result 
     210    msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
     211    ras = report(msg) 
     212    return, result 
    213213ENDIF 
    214214; 
     
    246246; 
    247247for jt=0,jpt-1 do begin 
    248   jtt=(time[jt]-julday(1,1,yea[jt])) < 364 
    249   q=reform(w_mean[*,*]) 
    250   w_m[*,*,jt]=q 
     248    jtt=(time[jt]-julday(1,1,yea[jt])) < 364 
     249    q=reform(w_mean[*,*]) 
     250    w_m[*,*,jt]=q 
    251251endfor 
    252252help, w_m 
  • trunk/src/ws_tropflux_1d_to_1m_ncdf.pro

    r181 r203  
    4646; ======== 
    4747; 
    48 ; :: 
    49 ; 
    50 ws_tropflux_1d_to_1m_ncdf 
     48; .. code-block:: idl 
     49; 
     50  ws_tropflux_1d_to_1m_ncdf 
    5151; 
    5252; KNOWN ISSUES 
  • trunk/src/x_site_location.pro

    r181 r203  
    1515; ======== 
    1616; 
    17 ; :: 
     17; .. code-block:: idl 
    1818; 
    19 ;   site = ++ 
    20 ;   result = x_site_location(site) 
     19;    site = ++ 
     20;    result = x_site_location(site) 
    2121; 
    2222; SEE ALSO 
  • trunk/src/y_site_location.pro

    r181 r203  
    1515; ======== 
    1616; 
    17 ; :: 
     17; .. code-block:: idl 
    1818; 
    19 ;   site = ++ 
    20 ;   result = y_site_location(site) 
     19;    site = ++ 
     20;    result = y_site_location(site) 
    2121; 
    2222; SEE ALSO 
Note: See TracChangeset for help on using the changeset viewer.