Changeset 460 for trunk


Ignore:
Timestamp:
12/13/11 15:51:21 (13 years ago)
Author:
pinsard
Message:

geobox in amsu t2 file terminology

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/file_amsu_t2_to_mem.pro

    r459 r460  
    55; ======================= 
    66; 
    7 ; .. function:: file_amsu_t2_to_mem(yyyy, mm, dd, numch, testfilename) 
     7; .. function:: file_amsu_t2_to_mem(yyyy, mm, dd, numch, lon_min, lon_max, lat_min, lat_max, testfilename) 
    88; 
    99; DESCRIPTION 
     
    1313; 
    1414; This type of file has been produced by :ref:`extract_amsua.pro` 
    15 ; thow landseamask is NaN++ 
    1615; 
    1716; If **testfilename** is not empty, this filename will be written, otherwise 
     
    2524; 
    2625; Realistic example with VARAMMA file AMSU-A chanel 5 
    27 ; :file:`${PROJECT_ID}/AMSU/2006/08/a5_20060801.dat`:: 
     26; :file:`${PROJECT_ID}/AMSU/2006/08/a5_20060801_060w30s_050e45n.dat`:: 
    2827; 
    2928;   IDL> numch='a5' 
     
    3130;   IDL> mm=8 
    3231;   IDL> dd=1 
     32;   IDL> lon_min=-60. 
     33;   IDL> lon_max=50. 
     34;   IDL> lat_min=-30. 
     35;   IDL> lat_max=45. 
    3336;   IDL> testfilename='' 
    34 ;   IDL> result = file_amsu_t2_to_mem(yyyy, mm, dd, numch, testfilename) 
     37;   IDL> result = file_amsu_t2_to_mem(yyyy, mm, dd, numch, lon_min, lon_max, lat_min, lat_max, testfilename) 
    3538; 
    3639; impression de controle : structure et 1re ligne de données:: 
     
    5356; ajouter de # dans les lignes d'entete 
    5457; 
    55 ; à intégrer dans correct_nadir_amsu.pro 
     58; à intégrer dansla chaine de traitement amsu 
    5659; 
    5760; check args 
     
    6568; 
    6669; $URL$ 
     70; 
     71; - fplod 20111213T143503Z aedon.locean-ipsl.upmc.fr (Darwin) 
     72; 
     73;   * geobox in filename 
    6774; 
    6875; - fplod 20111213T094118Z cratos (Linux) 
     
    95102;- 
    96103FUNCTION file_amsu_t2_to_mem, yyyy, mm, dd, numch $ 
     104                            , lon_min, lon_max, lat_min, lat_max $ 
    97105                            , testfilename 
    98106; 
     
    106114usage = 'result=file_amsu_t2_to_mem(yyyy, mm, dd, numch, testfilename)' 
    107115nparam = N_PARAMS() 
    108 IF (nparam NE 5) THEN BEGIN 
     116IF (nparam NE 9) THEN BEGIN 
    109117   ras = report(['Incorrect number of arguments.' $ 
    110118         + '!C' $ 
     
    114122; 
    115123if (testfilename eq '') then begin 
     124    look = 'filename' 
     125    scale = 1. 
     126    geomin = geolocation_to_string_idl(lon_min, lat_min, look, scale) 
     127    geomax = geolocation_to_string_idl(lon_max, lat_max, look, scale) 
    116128    fullfilename = project_id_env+ 'AMSU/' $ 
    117129            + string(yyyy,format='(I4.4)') + '/' $ 
     
    120132            + string(yyyy,format='(I4.4)') $ 
    121133            + string(mm,format='(I2.2)') $ 
    122             + string(dd,format='(I2.2)') $ 
     134            + string(dd,format='(I2.2)') + '_' $ 
     135            + geomin + '_' $ 
     136            + geomax $ 
    123137            + '.dat' 
    124138endif else begin 
     
    165179;++ handle error 
    166180; 
    167 help, result,/structure 
    168 help, header1,/structure 
    169181; read header lines 
    170182READF, lun, header1, format=format_header1 
  • trunk/src/mem_to_file_amsu_t2.pro

    r459 r460  
    55; ======================= 
    66; 
    7 ; .. function:: mem_to_file_amsu_t2(yyyy, mm, dd, numch, amsu_t2, testfilename) 
     7; .. function:: mem_to_file_amsu_t2(amsu_t2, testfilename) 
    88; 
    99; DESCRIPTION 
     
    4444; :func:`file_amsu_t2_to_mem` 
    4545; 
     46; use :func:`geolocation_to_string_idl` 
     47; 
    4648; TODO 
    4749; ==== 
     
    5557; check args 
    5658; 
    57 ; spécial idl : je narrive pas à éviter la boucle sur les ligens de data !! 
     59; spécial idl : je n'arrive pas à éviter la boucle sur les lignes de data !! 
    5860; 
    5961; EVOLUTIONS 
     
    6365; 
    6466; $URL$ 
     67; 
     68; - fplod 20111213T143503Z aedon.locean-ipsl.upmc.fr (Darwin) 
     69; 
     70;   * geobox in filename 
    6571; 
    6672; - fplod 20111213T094118Z cratos (Linux) 
     
    8995;- 
    9096FUNCTION mem_to_file_amsu_t2, amsu_t2 $ 
    91                             , testfilename 
     97                            , testfilename 
    9298; 
    9399compile_opt idl2, strictarrsubs 
     
    109115ENDIF 
    110116; 
     117 
    111118if (testfilename eq '') then begin 
     119    look = 'filename' 
     120    scale = 1. 
     121    geomin = geolocation_to_string_idl(amsu_t2.header2.lon_min, amsu_t2.header2.lat_min, look, scale) 
     122    geomax = geolocation_to_string_idl(amsu_t2.header2.lon_max, amsu_t2.header2.lat_max, look, scale) 
    112123    fullfilename = project_id_env+ 'AMSU/' $ 
    113124            + string(amsu_t2.header1.yyyy,format='(I4.4)') + '/' $ 
     
    116127            + string(amsu_t2.header1.yyyy,format='(I4.4)') $ 
    117128            + string(amsu_t2.header1.mm,format='(I2.2)') $ 
    118             + string(amsu_t2.header1.dd,format='(I2.2)') $ 
     129            + string(amsu_t2.header1.dd,format='(I2.2)') + '_' $ 
     130            + geomin + '_' $ 
     131            + geomax $ 
    119132            + '.dat' 
    120133endif else begin 
Note: See TracChangeset for help on using the changeset viewer.