Changeset 5 for trunk


Ignore:
Timestamp:
11/29/10 19:18:40 (13 years ago)
Author:
pinsard
Message:

draft of output files

Location:
trunk/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/dm2dd.pro

    r2 r5  
     1; 
    12;+ 
    23; 
     
    910;    Calculate the decimal degree for a given degree and minute 
    1011; 
    11 ;    :param degree: degree  
     12;    :param degree: degree 
    1213;    :type degree: integer 
    1314;    :raise degree: required 
    1415; 
    15 ;    :param minute: minute  
     16;    :param minute: minute 
    1617;    :type minute: float 
    1718;    :raise minute: required 
  • trunk/src/dmean_mld.pro

    r2 r5  
    3636; :func:`file_prn_to_mem` 
    3737; :func:`join_mean_asc` 
    38 ;  
     38; 
    3939; :restrictions: 
    4040; 
     
    9999ndays=n_elements(days) 
    100100; 
    101 ; initialize dimension of the returned structure  
     101; initialize dimension of the returned structure 
    102102result = replicate(resultstruct, ndays) 
    103103result.doy=days 
  • trunk/src/dms2dd.pro

    r2 r5  
    99;    Calculate the decimal degree for a given degree minute and second 
    1010; 
    11 ;    :param degree: degree  
     11;    :param degree: degree 
    1212;    :type degree: integer 
    1313;    :raise degree: required 
    1414; 
    15 ;    :param minute: minute  
     15;    :param minute: minute 
    1616;    :type minute: integer 
    1717;    :raise minute: required 
    1818; 
    19 ;    :param second: second  
     19;    :param second: second 
    2020;    :type second: integer 
    2121;    :raise second: required 
  • trunk/src/fig_mld.pro

    r4 r5  
    1616; location 
    1717; - plot ++ 
     18; - write file:`${POMME_OD}/fig_mld.txt` 
    1819; 
    1920; :examples: 
     
    3839; :func:`join_dmean_asc` 
    3940; 
     41; :func:`reform` 
     42; 
    4043; :todo: 
    4144; 
     
    4447; consolidate 
    4548; 
    46 ; delta array of 2 : .5 1 
     49; better organisation of output files 
    4750; 
    4851; noter dans la doc data que l'axe des temps des fichiers modeles est incorrect 
     
    5255; - fplod 20101129T151939Z aedon.locean-ipsl.upmc.fr (Darwin) 
    5356; 
     57;   * loop on delta 
     58;   * create output file 
    5459;   * use http://www.dfanning.com/math_tips/nans.html to test *equality* to NaN 
    5560; 
     
    9499data_insitu=join_dmean_asc(data_dmean,data_asc) 
    95100; 
    96 ; calcul du temps des données insitu avec comme 0 le 20000927 
     101; calcul du temps des données insitu avec comme 0 le 20000927 ++ 
    97102time_insitu=julday(1,1,2001) - julday(09,27,2000) - 1 + data_insitu.doy 
    98103; 
     
    109114   indice_insitu=WHERE(time_insitu EQ iday,count) 
    110115   IF (count EQ 0) THEN BEGIN 
    111       print, '1 ', iday, ' no insitu data' 
    112116      mld1[iday] = !VALUES.F_NAN 
    113117      mld2[iday] = !VALUES.F_NAN 
     
    118122      ylat[iday] = !VALUES.F_NAN 
    119123   ENDIF ELSE BEGIN 
    120       print, '2 ', iday, ' 1 insitu data' 
    121124      mld1[iday] = data_insitu[indice_insitu].mean_zhom001 
    122125      mld2[iday] = data_insitu[indice_insitu].mean_zhom002 
     
    141144delta[0] = 0.5 
    142145delta[1] = 1. 
    143 ; 
    144 ; loop on idelta ++ 
    145 idelta = 0 
    146 ; 
    147 ; loop on days 
     146ndelta=n_elements(delta) 
     147; 
     148; loop on delta 
     149FOR idelta=0, ndelta - 1 DO BEGIN 
     150   ; loop on days 
     151   FOR iday=0, ndays - 1 DO BEGIN 
     152      IF (finite(mld1[iday]) NE 0) THEN BEGIN 
     153         print, ' 3 iday xlon', iday, xlon[iday] 
     154         domdef 
     155         mybox = [ xlon[iday]-delta[idelta] $ 
     156                 , xlon[iday]+delta[idelta] $ 
     157                 , ylat[iday]-delta[idelta] $ 
     158                 , ylat[iday]+delta[idelta] $ 
     159                 ] 
     160         help, mybox 
     161         print, mybox 
     162 
     163         ; ++ verifier que la moyenne est bien faite dans la boite et pas dans tout le domaine 
     164         ;++ pb t point 
     165         ;mldm_box = reform(read_ncdf('mld', iday, /timestep, file=iodir+'eddy_mld.nc',  /nostruct, box = mybox)) 
     166         ;mldr_box = reform(read_ncdf('mld', iday, /timestep, file=iodir+'noeddy_mld.nc',  /nostruct, box = mybox)) 
     167 
     168         ;++mymldm[idelta,iday] = moyenne(mldm_box, box = mybox, 'xy') 
     169         ;++mymldr[idelta,iday] = moyenne(mldr_box, box = mybox, 'xy') 
     170         ;++myvarm[idelta,iday] = stddev(mldm_box) 
     171         ;++myvarr[idelta,iday] = stddev(mldr_box) 
     172      ENDIF ELSE BEGIN 
     173         ; print, '4 ',iday, ' no insitu data' 
     174         mymldm[idelta,iday] = !VALUES.F_NAN 
     175         mymldr[idelta,iday] = !VALUES.F_NAN 
     176         myvarm[idelta,iday] = !VALUES.F_NAN 
     177         myvarr[idelta,iday] = !VALUES.F_NAN 
     178      ENDELSE 
     179   ENDFOR 
     180ENDFOR 
     181; 
     182; Write results in ${POMME_OD}/fig_mld.txt 
     183filename=pomme_od_env+'fig_mld.txt' 
     184OPENW,lun, filename, /GET_LUN 
     185;++ hanlde error 
     186; 
     187header='jt xlon xlat mld1 mld2 mld3 mld4 mld5 mymldm_0 mymldr_0 myvarm_0 myvarr_0 mymldm_1 mymldr_1 myvarm_1 myvarr_1' 
     188; write header 
     189printf, lun, header 
     190; 
     191; write data lines 
    148192FOR iday=0, ndays - 1 DO BEGIN 
    149       print, ' 0 iday mld1 xlon', iday, mld1[iday], xlon[iday] 
    150    IF (finite(mld1[iday]) NE 0) THEN BEGIN 
    151       print, ' 3 ', iday, ' insitu data' 
    152       print, ' 3a ', iday, xlon[iday] 
    153       domdef 
    154       mybox = [ xlon[iday]-delta[idelta] $ 
    155               , xlon[iday]+delta[idelta] $ 
    156               , ylat[iday]-delta[idelta] $ 
    157               , ylat[iday]+delta[idelta] $ 
    158               ] 
    159       help, mybox 
    160       print, mybox 
    161  
    162       ; ++ verifier que la moyenne est bien faite dans la boite et pas dans tout le domaine 
    163       mldm_box = reform(read_ncdf('mld', iday, /timestep, file=iodir+'eddy_mld.nc',  /nostruct, box = mybox)) 
    164       mldr_box = reform(read_ncdf('mld', iday, /timestep, file=iodir+'noeddy_mld.nc',  /nostruct, box = mybox)) 
    165  
    166       mymldm[idelta,iday] = moyenne(mldm_box, box = mybox, 'xy') 
    167       mymldr[idelta,iday] = moyenne(mldr_box, box = mybox, 'xy') 
    168       myvarm[idelta,iday] = stddev(mldm) 
    169       myvarr[idelta,iday] = stddev(mldr) 
    170    ENDIF ELSE BEGIN 
    171       print, '4 ',iday, ' no insitu data' 
    172       mymldm[idelta,iday] = !VALUES.F_NAN 
    173       mymldr[idelta,iday] = !VALUES.F_NAN 
    174       myvarm[idelta,iday] = !VALUES.F_NAN 
    175       myvarr[idelta,iday] = !VALUES.F_NAN 
    176    ENDELSE 
     193   printf, lun $ 
     194         , iday $ 
     195         , xlon[iday] $ 
     196         , ylat[iday] $ 
     197         , mld1[iday] $ 
     198         , mld2[iday] $ 
     199         , mld3[iday] $ 
     200         , mld4[iday] $ 
     201         , mld5[iday] $ 
     202         , mymldm[0,iday] $ 
     203         , mymldr[0,iday] $ 
     204         , myvarm[0,iday] $ 
     205         , myvarr[0,iday] $ 
     206         , mymldm[1,iday] $ 
     207         , mymldr[1,iday] $ 
     208         , myvarm[1,iday] $ 
     209         , myvarr[1,iday] 
    177210ENDFOR 
    178211; 
    179 ;write, jt, xlon, ylat, mld1, mld2, mld3, mld4, mld5, mymldm, mymldr,myvarm, myvarr,mymldm[1], mymldr[1],myvarm[1], myvarr[1] 
     212; close file 
     213FREE_LUN, lun 
     214; 
    180215END 
  • trunk/src/file_asc_p1l1_to_mem.pro

    r2 r5  
    9696; 
    9797resultstruct = { station:0L $ 
    98                  , prof :0L $  
     98                 , prof :0L $ 
    9999                 , zctd : 0L $ 
    100100                 , an: 0L $ 
     
    106106                 , deg_lat_begin : 0L $ 
    107107                 , mm_lat_begin: 0.0 $ 
    108                  , deg_lon_begin: 0L $  
    109                  , mm_lon_begin: 0.0 $  
     108                 , deg_lon_begin: 0L $ 
     109                 , mm_lon_begin: 0.0 $ 
    110110               } 
    111111nrows = file_lines(filename) - N_ELEMENTS(header); 
  • trunk/src/file_asc_p2l2_to_mem.pro

    r2 r5  
    1717; 
    1818; notes 
    19 ; decalage  
     19; decalage 
    2020; xx 
    2121; 
  • trunk/src/file_prn_to_mem.pro

    r2 r5  
    1717; 
    1818; Realistic example with POMME files:: 
    19 ;     
     19; 
    2020;    IDL> result=file_prn_to_mem() 
    2121; 
  • trunk/src/init_pom.pro

    r3 r5  
    1111; - ++ 
    1212; - ++ 
    13 ;  
     13; 
    1414; Read :file:`${POMME_ID}/meshmak.nc`. 
    1515; 
     
    6363; 
    6464pomme_id_env=GETENV('POMME_ID') 
     65pomme_od_env=GETENV('POMME_OD') 
    6566; 
    6667iodir = isadirectory(pomme_id_env) 
  • trunk/src/join_dmean_asc.pro

    r3 r5  
    99;    Join information from mean (++details) and asc (++detail) structures 
    1010; 
    11 ;    If station is not found in data_asc structure, latitude and longitude are set  
     11;    If station is not found in data_asc structure, latitude and longitude are set 
    1212;    to NaN. 
    1313; 
Note: See TracChangeset for help on using the changeset viewer.