New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 2557 for trunk/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/ts_mean_S.pro – NEMO

Ignore:
Timestamp:
2011-01-14T13:24:21+01:00 (13 years ago)
Author:
flavoni
Message:

update script .pro, added mask into average computation, see ticket #724

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/CONFIG/ORCA2_LIM/IDL_scripts/ts_mean_S.pro

    r2537 r2557  
    1717  filename = std_iodir_climato+'data_1y_salinity_nomask.nc' 
    1818  Lev = read_ncdf('vosaline', filename = filename, /nostruct ) 
    19   Lev_xyz = moyenne(Lev, 'xyz') 
    20   Lev_z = moyenne(Lev, 'xy',/KEEPBOTTOM) 
     19  Lev_xyz = moyenne(Lev, 'xyz',  mask2d = masknp) 
     20  Lev_z = moyenne(Lev, 'xy', mask2d = masknp ,/KEEPBOTTOM) 
    2121 
    2222  ts_Sal = 0. 
     
    2727  ts_z = fltarr(jpk) 
    2828  ts_z_2 = fltarr(jpk) 
     29 
     30  masknp = read_ncdf('tmaskutil', file = 'mesh_mask_partial.nc', /nostruct) 
    2931 
    3032  for year=year1,year2 do begin 
     
    4143     SSH_2 =  read_ncdf('zos',date1 ,date2 , filename = filename2, /nostruct) 
    4244 
    43      ts_Sal = [ ts_Sal, moyenne(Sal, 'xyz', ssh = SSH) ] 
    44      ts_Sal_2 = [ ts_Sal_2, moyenne(Sal_2, 'xyz', ssh = SSH_2) ] 
    45      ts_Sal_Lev = [ ts_Sal_Lev, moyenne(Sal, 'xyz', ssh = SSH) - Lev_xyz ] 
    46      ts_Sal_Lev_2 = [ ts_Sal_Lev_2, moyenne(Sal_2, 'xyz', ssh = SSH_2) - Lev_xyz ] 
     45     ts_Sal = [ ts_Sal, moyenne(Sal, 'xyz', mask2d = masknp, ssh = SSH) ] 
     46     ts_Sal_2 = [ ts_Sal_2, moyenne(Sal_2, 'xyz', mask2d = masknp, ssh = SSH_2) ] 
     47     ts_Sal_Lev = [ ts_Sal_Lev, moyenne(Sal, 'xyz', mask2d = masknp, ssh = SSH) - Lev_xyz ] 
     48     ts_Sal_Lev_2 = [ ts_Sal_Lev_2, moyenne(Sal_2, 'xyz', mask2d = masknp, ssh = SSH_2) - Lev_xyz ] 
    4749     ts_Time = [ ts_Time, Time] ; Time = date 
    4850 
    49      ts_z = [ [ts_z], [moyenne(Sal, 'xy',/KEEPBOTTOM, ssh = SSH)- Lev_z] ] 
    50      ts_z_2 = [ [ts_z_2], [moyenne(Sal_2, 'xy',/KEEPBOTTOM, ssh = SSH_2)- Lev_z] ] 
     51     ts_z = [ [ts_z], [moyenne(Sal, 'xy',/KEEPBOTTOM, mask2d = masknp, ssh = SSH)- Lev_z] ] 
     52     ts_z_2 = [ [ts_z_2], [moyenne(Sal_2, 'xy',/KEEPBOTTOM, mask2d = masknp, ssh = SSH_2)- Lev_z] ] 
    5153 
    5254  endfor 
Note: See TracChangeset for help on using the changeset viewer.