Ignore:
Timestamp:
03/16/14 20:38:39 (10 years ago)
Author:
pinsard
Message:

fix thanks to coding rules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FIG_bar_transp_write.pro

    r2 r48  
    1 PRO FIG_bar_transp_write,iyear,ian  
     1PRO FIG_bar_transp_write,iyear,ian 
    22@init2 
    33@initorca2_bab 
     
    1515;e_year0='10' 
    1616key_portrait = 0 
    17 ; stockage des fichiers brut  
     17; stockage des fichiers brut 
    1818  ioDATA='/usr/work/sur/fvi/OPA/ORCA2/'+e_exp 
    19   file_U=e_exp+'_5d_'+ian+'0101_'+ian+'1231_grid_U.nc'  
     19  file_U=e_exp+'_5d_'+ian+'0101_'+ian+'1231_grid_U.nc' 
    2020  print, file_U 
    21   file_V=e_exp+'_5d_'+ian+'0101_'+ian+'1231_grid_V.nc'  
     21  file_V=e_exp+'_5d_'+ian+'0101_'+ian+'1231_grid_V.nc' 
    2222  print, file_V 
    2323 
     
    2727     t_bt  = 'bar_transp' 
    2828ioORLN2 = '/usr/work/sur/fvi/OPA/ORCA2' 
    29 ;facteur d'echelle vertical  for partial steps 
     29;facteur d'echelle vertical for partial steps 
    3030e3v3d=read_ncdf('e3v_ps',0,/timestep,iodir=ioORLN2,/nostruct,/tout,filename='meshmask_bab.nc') 
    3131e3u3d=read_ncdf('e3u_ps',0,/timestep,iodir=ioORLN2,/nostruct,/tout,filename='meshmask_bab.nc') 
     
    3434 
    3535; vertical integration: 
    36 e3t3d=make_array(jpi,jpj,jpk)    
     36e3t3d=make_array(jpi,jpj,jpk) 
    3737        for k=0, jpk-1 do begin              &$ 
    38           for j=0,jpj-1 do begin              &$       
     38          for j=0,jpj-1 do begin              &$ 
    3939            for i=0,jpi-1 do begin             &$ 
    4040              e3t3d(i,j,k) = e3t(k)    &$ 
     
    4444jpt = 73 
    4545 
    46 ;vud = make_array(jpi,jpj,jpt)    
     46;vud = make_array(jpi,jpj,jpt) 
    4747;vvd = make_array(jpi, jpj, jpt) 
    4848 
    49 ; ouverture des fichiers dans lesquels on va écrire  
     49; ouverture des fichiers dans lesquels on va écrire 
    5050id3=NCDF_OPEN('/usr/work/sur/fvi/geomag/U_5d_'+iyear+'_grid_T.nc',/write) 
    5151id4=NCDF_OPEN('/usr/work/sur/fvi/geomag/V_5d_'+iyear+'_grid_T.nc',/write) 
    5252 
    53 FOR jt = 0, jpt-1 DO BEGIN &$    
     53FOR jt = 0, jpt-1 DO BEGIN &$ 
    5454 
    5555; ouverture des fichiers et stockage en memoire partial steps 
    56   vu=read_ncdf('vozocrtx',jt,jt, /timestep, iodir=ioDATA,/nostruct,/TOUT,filename=file_U)  &$    
    57   vv=read_ncdf('vomecrty',jt,jt, /timestep,iodir=ioDATA,/nostruct,/TOUT,filename=file_V)  &$    
     56  vu=read_ncdf('vozocrtx',jt,jt, /timestep, iodir=ioDATA,/nostruct,/TOUT,filename=file_U)  &$ 
     57  vv=read_ncdf('vomecrty',jt,jt, /timestep,iodir=ioDATA,/nostruct,/TOUT,filename=file_V)  &$ 
    5858 
    59    
     59 
    6060 
    6161; Somme sur la verticale partial steps 
    62                 vum=total( vu*e3u3d*umask(),3 )  &$    
    63                 vvm=total( vv*e3v3d*vmask(),3 )  &$    
     62                vum=total( vu*e3u3d*umask(),3 )  &$ 
     63                vvm=total( vv*e3v3d*vmask(),3 )  &$ 
    6464 
    6565; Shit sur la grille T partial steps 
    66              vut= (vum+shift(vum,1,0) )*0.5   &$    
     66             vut= (vum+shift(vum,1,0) )*0.5   &$ 
    6767             vvt= (vvm+shift(vvm,0,1) )*0.5   &$ 
    68 ; Bande de recouvrement  
     68; Bande de recouvrement 
    6969             vut(0, *) = vut(jpi-2, *) 
    7070             vvt(*, 0) = 0. 
    71 ; stockage dans le fichier de sortie  
     71; stockage dans le fichier de sortie 
    7272NCDF_VARPUT, id3,'sossheig',vut, offset = [0, 0, jt] 
    7373NCDF_VARPUT, id4,'sossheig',vvt, offset = [0, 0, jt] 
     
    7575print,  jt 
    7676 
    77 ENDFOR   
     77ENDFOR 
    7878; on ferme le NetCDF 
    7979NCDF_CLOSE,id3 
     
    107107;    tidout = NCDF_DIMDEF(idout, 'time_counter', /unlimited) 
    108108 
    109     
     109 
    110110; Attributs globaux 
    111111;    id0  = NCDF_VARDEF(idout, 'nav_lon'     , [xidout, yidout                ], /FLOAT) 
     
    141141;    NCDF_ATTPUT, idout, id5, 'title', 'vomecrty' 
    142142;    NCDF_ATTPUT, idout, id5, 'long_name', 'meridian current summmed on vertical' 
    143   
     143 
    144144;    NCDF_CONTROL, idout, /ENDEF 
    145145 
     
    148148; Creation de la latitude 
    149149;    NCDF_VARPUT, idout, id1, gphit 
    150 ; Creation de la profondeur  
     150; Creation de la profondeur 
    151151;    prof=1. 
    152 ;    NCDF_VARPUT, idout, id2, prof  
     152;    NCDF_VARPUT, idout, id2, prof 
    153153; Creation du calendrier 
    154154;   temps = findgen(jpt)*5.*86400. +julday(1, 1, 1) 
     
    158158;    NCDF_VARPUT, idout, id3, temps 
    159159 
    160     
     160 
    161161; Ecriture des donnees 
    162162 
Note: See TracChangeset for help on using the changeset viewer.