Changeset 153


Ignore:
Timestamp:
03/05/12 18:59:09 (12 years ago)
Author:
pinsard
Message:

pro oaflux_mask_30n30s is now a function

Location:
trunk/src
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/TropFlux_19890101_20091231.pro

    r100 r153  
    1818; OAFLUX grid 
    1919; has been produced by 
    20 ; :ref:`oaflux_mask_30N30S.pro`. 
     20; :func:`oaflux_mask_30n30s`. 
    2121; 
    2222; :file:`${PROJECT_OD}/TropFlux_sst_19890101_20091231.nc` 
  • trunk/src/interp_erai_dewt_1989_2009.pro

    r100 r153  
    2121; containing OAFLUX grid 
    2222; has been produced by 
    23 ; :ref:`oaflux_mask_30N30S.pro`. 
     23; :func:`oaflux_mask_30n30s.pro`. 
    2424; 
    2525; Interpolated d2 
  • trunk/src/interp_erai_lwr_1989_2009.pro

    r100 r153  
    2020; containing OAFLUX mask 
    2121; has been produced by 
    22 ; :ref:`oaflux_mask_30N30S.pro`. 
     22; :func:`oaflux_mask_30n30s`. 
    2323; 
    2424; Interpolated str 
     
    147147;   * fix typo 
    148148;     .. note:: 
    149 ; 
    150149;        IDL do not warn when asking size of an undefined array:: 
    151150; 
  • trunk/src/interp_erai_msl_1989_2009.pro

    r100 r153  
    2222; OAFLUX grid 
    2323; has been produced by 
    24 ; :ref:`oaflux_mask_30N30S.pro`. 
     24; :func:`oaflux_mask_30n30s`. 
    2525; 
    2626; Interpolated msl 
  • trunk/src/interp_erai_sst_1989_2009.pro

    r100 r153  
    2121; OAFLUX grid 
    2222; has been produced by 
    23 ; :ref:`oaflux_mask_30N30S.pro`. 
     23; :func:`oaflux_mask_30n30s`. 
    2424; 
    2525; Interpolated sst 
  • trunk/src/interp_erai_t2m_1989_2009.pro

    r100 r153  
    2121; containing OAFLUX grid 
    2222; has been produced by 
    23 ; :ref:`oaflux_mask_30N30S.pro`. 
     23; :func:`oaflux_mask_30n30s`. 
    2424; 
    2525; Interpolated t2 
     
    6666; :ref:`compute_erai_daily_region_2d.sh` 
    6767; 
    68 ; :ref:`oaflux_mask_30N30S.pro` 
     68; :func:`oaflux_mask_30n30s` 
    6969; 
    7070; :func:`report <saxo:report>` 
  • trunk/src/interp_erai_ws_1989_2009.pro

    r100 r153  
    2727; containing OAFLUX grid 
    2828; has been produced by 
    29 ; :ref:`oaflux_mask_30N30S.pro`. 
     29; :func:`oaflux_mask_30n30s.pro`. 
    3030; 
    3131; Interpolated u10 and v10 are written in 
  • trunk/src/interp_olr_30n30s_1989_2009.pro

    r100 r153  
    1818; :file:`${PROJECT_ID}/mask_oaflux_30N30S.nc` containing OAFLUX grid 
    1919; have been produced by 
    20 ; :ref:`oaflux_mask_30N30S.pro`. 
     20; :func:`oaflux_mask_30n30s`. 
    2121; 
    2222; Interpolated OLR is written in 
  • trunk/src/oaflux_mask_30n30s.pro

    • Property svn:keywords set to Id URL
    r99 r153  
    11;+ 
    22; 
    3 ; .. _oaflux_mask_30n30s.pro: 
    4 ; 
    53; ====================== 
    6 ; oaflux_mask_30n30s.pro  
     4; oaflux_mask_30n30s.pro 
    75; ====================== 
     6; 
     7; .. function:: oaflux_mask_30n30s() 
     8; 
     9; DESCRIPTION 
     10; =========== 
    811; 
    912; Produce a NetCDF file with OAFLUX mask over global tropical oceans (30N-30S) 
     
    3336;      } 
    3437; 
     38; :returns: 0 if ok,  -1 if error 
     39; :rtype: integer 
     40; 
    3541; SEE ALSO 
    3642; ======== 
     
    4046; :ref:`guide data OAFLUX <data_in_oaflux>` 
    4147; 
    42 ; :ref:`project_profile.sh` 
    43 ; :ref:`project_init.pro` 
     48; Environement : 
     49; :ref:`project_profile.sh`,  
     50; :ref:`project_init.pro`, 
    4451; :ref:`cm_project.pro` 
    4552; 
    46 ; :ref:`get_oaflux.sh` 
    47 ; 
    48 ; :func:`report <saxo:report>` 
    49 ; :func:`initncdf <saxo:initncdf>` 
    50 ; :func:`ncdf_lec <saxo:ncdf_lec>` 
    51 ; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>` 
    52 ; :func:`isadirectory <saxo:isadirectory>` 
     53; Previous step : :ref:`get_oaflux.sh` 
     54; 
     55; Use : 
     56; :func:`report <saxo:report>`, 
     57; :func:`initncdf <saxo:initncdf>`, 
     58; :func:`ncdf_lec <saxo:ncdf_lec>`, 
     59; :func:`ncdf_quickwrite <saxo:ncdf_quickwrite>`, 
     60; :func:`isadirectory <saxo:isadirectory>`, 
    5361; :func:`isafile <saxo:isafile>` 
    5462; 
    55 ; :ref:`TropFlux_19890101_20091231.pro` 
    56 ; :ref:`interp_erai_dewt_1989_2009.pro` 
    57 ; :ref:`interp_erai_lwr_1989_2009.pro` 
    58 ; :ref:`interp_erai_sst_1989_2009.pro` 
    59 ; :ref:`interp_erai_t2m_1989_2009.pro` 
    60 ; :ref:`interp_erai_ws_1989_2009.pro` 
     63; Following program use :func:`oaflux_mask_30n30s` output: 
     64; :ref:`TropFlux_19890101_20091231.pro`, 
     65; :ref:`interp_erai_dewt_1989_2009.pro`, 
     66; :ref:`interp_erai_lwr_1989_2009.pro`, 
     67; :ref:`interp_erai_sst_1989_2009.pro`, 
     68; :ref:`interp_erai_t2m_1989_2009.pro`, 
     69; :ref:`interp_erai_ws_1989_2009.pro`, 
    6170; :ref:`interp_olr_30n30s_1989_2009.pro` 
    6271; 
     
    6675; :: 
    6776; 
    68 ;  IDL> oaflux_mask_30n30s 
     77;  IDL> result = oaflux_mask_30n30s() 
    6978; 
    7079; TODO 
     
    7483; 
    7584; coding rules 
    76 ; 
    77 ; pro -> function 
    7885; 
    7986; NetCDF CF (may be area_type) 
     
    8390;  - while data latitude=[-29.5,+29.5] longitude=[30.5,379.5] 
    8491; 
     92; 30n30s in name vs future global output ... parameters lat and long max 
     93; 
    8594; KNOWN ISSUES 
    8695; ============ 
     
    91100; EVOLUTIONS 
    92101; ========== 
    93 ;  
     102; 
    94103; $Id$ 
     104; 
     105; $URL$ 
     106; 
     107; - fplod 20120305 
     108; 
     109;   * pro -> function 
    95110; 
    96111; - fplod 20110411T140133Z aedon.locean-ipsl.upmc.fr (Darwin) 
     
    98113;   * usage of tropflux_init and cm_project 
    99114;   * replace 30N30S by 30n30s 
    100 ;  
     115; 
    101116; - fplod 20101217T081915Z aedon.locean-ipsl.upmc.fr (Darwin) 
    102117; 
     
    114129;- 
    115130; 
    116 PRO oaflux_mask_30n30s 
     131FUNCTION oaflux_mask_30n30s 
    117132; 
    118133@cm_4cal 
     
    122137@cm_project 
    123138 
     139; Return to caller if errors 
     140on_error, 2 
     141; 
     142result = -1 
     143; 
     144usage = 'result=oaflux_mask_30n30s()' 
     145nparam = N_PARAMS() 
     146IF (nparam NE 0) THEN BEGIN 
     147   ras = report(['Incorrect number of arguments.' $ 
     148         + '!C' $ 
     149         + 'Usage : ' + usage]) 
     150   return, -1 
     151ENDIF 
     152; 
    124153; check for input file 
    125154; build input filename 
     
    133162   msg = 'eee : the file ' + fullfilename_in + ' was not found.' 
    134163   ras = report(msg) 
    135    STOP 
     164   return, -1 
    136165ENDIF 
    137166; 
     
    141170   msg = 'eee : the file ' + fullfilename_out  + ' already exists.' 
    142171   ras = report(msg) 
    143    STOP 
     172   return, -1 
    144173ENDIF 
    145174; 
    146175; Read oaflux grid and mask 
    147176initncdf, fullfilename_in 
    148 lh=ncdf_lec(fullfilename_in,var='lhtfl',count=[jpi,jpj,1])  
     177lh=ncdf_lec(fullfilename_in,var='lhtfl',count=[jpi,jpj,1]) 
    149178lh=float(lh) 
    150179valmask=1.e20 
    151 ind=where(lh ge 32000,compl=nind)  
    152 lh(ind)=valmask  
     180ind=where(lh ge 32000,compl=nind) 
     181lh(ind)=valmask 
    153182lh(nind)=-0.1*lh(nind) 
    154183mask_out=(lh ne valmask) 
     
    178207@ncdf_quickwrite 
    179208 
     209result = 0 
     210 
     211return, result 
    180212END 
  • trunk/src/tropflux.sh

    r151 r153  
    1 #! /bin/sh -x 
     1#! /bin/sh 
    22#+ 
    33# 
     
    4343#        digraph tropflux { 
    4444# 
     45#           file_oaflux [shape=ellipse,fontname=Courier,label="${PROJECT_ID}/lh_oaflux_2004.nc"]; 
     46 
    4547#           log [shape=ellipse,fontname=Courier,label="${PROJECT_LOG}/tropflux.log{YYYYMMDDTHHMMSSZ}"]; 
    4648# 
     
    5153#           label="${PROJECT}/src/tropflux.sh"]; 
    5254# 
    53 #           {++ mask} -> {tropflux} -> {log ++} 
     55#           {file_oaflux} -> {tropflux} -> {log fileout} 
    5456# 
    5557#         } 
     
    8385# 
    8486# Use : 
    85 # :ref:`inter_erai_t2m_1989_2009.pro`, etc. 
     87# :func:`oaflux_mask_30n30s`, :ref:`inter_erai_t2m_1989_2009.pro`, etc. 
    8688# 
    8789# Next step : +validation ++ comparison 
     
    108110# 
    109111#   * creation (draft) 
     112#   * handling error of oaflux_mask_30n30s (now a function) 
    110113# 
    111114#- 
     
    265268cat >> ${PROJECT}/src/tropflux_${$}.pro << EOF 
    266269.compile file_interp 
    267 ;oaflux_mask_30n30s 
     270result = oaflux_mask_30n30s() 
     271if (result NE 0) THEN BEGIN 
     272   msg = 'eee : pb after oaflux_mask_30n30s' 
     273   err = report(msg) 
     274   exit 
     275ENDIF 
    268276;interp_erai_dewt_1989_2009 
    269277;interp_erai_lwr_1989_2009 
     
    273281;interp_erai_ws_1989_2009 
    274282;interp_olr_30n30s_1989_2009 
    275 ;d2m_to_q2m_erai 
     283d2m_to_q2m_erai  
     284;++Program caused arithmetic error: Floating overflow 
     285;++ Program caused arithmetic error: Floating illegal operand 
    276286.compile TropFlux_swr_DT_19890101_20071231 
    277287tropflux_swr_dt_19890101_20071231 
     
    290300.compile TropFlux_NRT_ncdf 
    291301tropflux_nrt_ncdf 
     302exit 
    292303EOF 
    293 # 
    294 more ${PROJECT}/src/tropflux_${$}.pro 
    295 read a 
    296304# 
    297305# run IDL or equivalent 
Note: See TracChangeset for help on using the changeset viewer.