Changeset 108

User picture

Author: Trond Kristiansen

(2011/01/31 01:27) Over 1 year ago

Just a minor commit to update repositories

Affected files

Updated grd.py Download diff

107108
41
            self.grdName='NA'
41
            self.grdName='NA'
42
        elif grdfilename=="/Users/trond/Projects/Roms/Nordic/Inputs/imr_nordic_4km.nc":
42
        elif grdfilename=="/Users/trond/Projects/Roms/Nordic/Inputs/imr_nordic_4km.nc":
43
            self.grdName='Nordic'
43
            self.grdName='Nordic'
44
        elif grdfilename=="tromsN_800m_grid.nc":
45
            self.grdName='Troms'
44
        elif grdfilename=='/Users/trond/Projects/Nathan/NoMed47_GRID_Global.nc':
46
        elif grdfilename=='/Users/trond/Projects/Nathan/NoMed47_GRID_Global.nc':
45
            self.grdName='NA_Nathan'
47
            self.grdName='NA_Nathan'
46
        elif grdfilename=='/Users/trond/Projects/Nathan/GOM_GRID_Global.nc':
48
        elif grdfilename=='/Users/trond/Projects/Nathan/GOM_GRID_Global.nc':
...
...
187
            
189
            
188
            self.maxval=1000
190
            self.maxval=1000
189
            self.minDistPoints=5
191
            self.minDistPoints=5
190
            self.maxDistHorisontal=50
192
            self.maxDistHorisontal=40
191
            self.maxDistVertical=50
193
            self.maxDistVertical=40
192
            
194
            
193
            self.message  = None  # Used to store the date for printing to screen (IOwrite.py)
195
            self.message  = None  # Used to store the date for printing to screen (IOwrite.py)
194
            self.time     = 0
196
            self.time     = 0

Updated interp2D.py Download diff

107108
63
        
63
        
64
        array1[k,:,:]=Zin
64
        array1[k,:,:]=Zin
65
        
65
        
66
        #plotData.contourMap(grdROMS,grdMODEL,Zin,k,var)
66
      #  plotData.contourMap(grdROMS,grdMODEL,Zin,k,var)
67
        
67
        
68
        if show_progress is True:
68
        if show_progress is True:
69
            p=int( ((k+1*1.0)/(1.0*grdMODEL.Nlevels))*100.)
69
            p=int( ((k+1*1.0)/(1.0*grdMODEL.Nlevels))*100.)

Updated main.py Download diff

107108
70
        hycompath="/Users/trond/Projects/arcwarm/SODA/HYCOM/"
70
        hycompath="/Users/trond/Projects/arcwarm/SODA/HYCOM/"
71
    
71
    
72
    """Define the path to the grid file"""
72
    """Define the path to the grid file"""
73
    romsgridpath="/Volumes/HankRaid/ROMS/GoM/grid/gom_grd.nc"
73
    #romsgridpath="/Volumes/HankRaid/ROMS/GoM/grid/gom_grd.nc"
74
    romsgridpath="/Users/trond/Projects/Roms/GOMfull/Inputs/gom_grd11022010.nc"
74
    #romsgridpath="/Users/trond/Projects/Roms/GOMfull/Inputs/gom_grd11022010.nc"
75
    romsgridpath="/Users/trond/Projects/Roms/GOMfull/SmoothTopo/gom_grdSmoothed.nc"
75
    romsgridpath="/Users/trond/Projects/Roms/GOMfull/SmoothTopo/gom_grdSmoothed.nc"
76
    #romsgridpath="tromsN_800m_grid.nc"
76
    #romsgridpath="/Users/trond/Projects/Roms/GOMsmall/Inputs/gom_grd_small.nc"
77
    #romsgridpath="/Users/trond/Projects/Roms/GOMsmall/Inputs/gom_grd_small.nc"
77
    #romsgridpath="/Users/trond/Projects/Roms/GOMsmall/Inputs/ns8_grd.nc"
78
    #romsgridpath="/Users/trond/Projects/Roms/GOMsmall/Inputs/ns8_grd.nc"
78
    # CONTAINS NAN romsgridpath="/Users/trond/Projects/Roms/GOMfull/Inputs/gom_grd.nc"
79
    # CONTAINS NAN romsgridpath="/Users/trond/Projects/Roms/GOMfull/Inputs/gom_grd.nc"
79
    #romsgridpath="/Users/trond/Projects/Roms/Nordic/Inputs/imr_nordic_4km.nc"
80
    #romsgridpath="/Users/trond/Projects/Roms/Nordic/Inputs/imr_nordic_4km.nc"
80
    #romsgridpath="/Users/trond/Projects/Roms/Nordic/Inputs/imr_nordic_8km.nc"
81
    romsgridpath="/Users/trond/Projects/Roms/Nordic/Inputs/imr_nordic_8km.nc"
81
    #romsgridpath="/Users/trond/Projects/Roms/Julia/NATLC/Data/natl_40km.nc"
82
    #romsgridpath="/Users/trond/Projects/Roms/Julia/NATLC/Data/natl_40km.nc"
82
    
83
    
83
    start_year      =1960
84
    start_year      =1960
84
    end_year        =1964
85
    end_year        =1961
85
    start_julianday =0
86
    start_julianday =0
86
    end_julianday   =365
87
    end_julianday   =35
87
    
88
    
88
    """Subset the input data. The more you subset the less memory is needed for calculations
89
    """Subset the input data. The more you subset the less memory is needed for calculations
89
    and the faster the process is performed. The subset is initially performed in IOsubset.py"""
90
    and the faster the process is performed. The subset is initially performed in IOsubset.py"""
90
    minLat=30; maxLat=55; minLon=-90; maxLon=-50
91
    minLat=40; maxLat=90; minLon=-40; maxLon=136
91
    subset=np.zeros(4); subset[0]=minLat; subset[1]=maxLat; subset[2]=minLon; subset[3]=maxLon
92
    subset=np.zeros(4); subset[0]=minLat; subset[1]=maxLat; subset[2]=minLon; subset[3]=maxLon
92
    
93
    
93
    """Name of output files for CLIM, BRY, and INIT files"""
94
    """Name of output files for CLIM, BRY, and INIT files"""
...
...
97
    
98
    
98
    """Define what variables to include in the forcing files"""
99
    """Define what variables to include in the forcing files"""
99
    vars=['temperature','salinity','ssh','uvel','vvel']
100
    vars=['temperature','salinity','ssh','uvel','vvel']
100
    
101
    vars=['salinity']
101
    """5 day or 30 day average files for SODA"""
102
    """5 day or 30 day average files for SODA"""
102
    if type=='SODA': aveDays=5.0
103
    if type=='SODA': aveDays=5.0
103
    if type=='SODAMONTHLY': aveDays=30.0
104
    if type=='SODAMONTHLY': aveDays=30.0

Updated plotData.py Download diff

107108
33
        map = Basemap(lon_0=25,boundinglat=50,
33
        map = Basemap(lon_0=25,boundinglat=50,
34
                      resolution='l',area_thresh=100.,projection='npstere')
34
                      resolution='l',area_thresh=100.,projection='npstere')
35
        levels = np.arange(-2.0, 15.0, 0.1)
35
        levels = np.arange(-2.0, 15.0, 0.1)
36
    
37
    if grdROMS.grdName=='Troms':
38
        map = Basemap(projection='merc',llcrnrlat=68,urcrnrlat=72,\
39
            llcrnrlon=15,urcrnrlon=24,lat_ts=70,resolution='h',area_thresh=0.)
40
        levels = np.arange(-2.0, 8.0, 0.25)
36
        
41
        
37
    if grdROMS.grdName=='NorthSea':
42
    if grdROMS.grdName=='NorthSea':
38
        map = Basemap(llcrnrlon=grdROMS.lon_rho[0,:].min()-15.25,
43
        map = Basemap(llcrnrlon=grdROMS.lon_rho[0,:].min()-15.25,
...
...
72
    map.drawcountries()
77
    map.drawcountries()
73
    #map.drawmapboundary()
78
    #map.drawmapboundary()
74
79
75
    #map.drawmeridians(np.arange(0,360,5))
80
    #map.drawmeridians(np.arange(0,360,1))
76
    #map.drawparallels(np.arange(0,90,5))
81
    #map.drawparallels(np.arange(0,90,1))
77
82
78
    temp = np.ma.masked_values(temp,grdROMS.fill_value)
83
    temp = np.ma.masked_values(temp,grdROMS.fill_value)
79
    if var=='salinity':
84
    if var=='salinity':
...
...
91
        plt.colorbar(orientation='horizontal')  
96
        plt.colorbar(orientation='horizontal')  
92
    else:
97
    else:
93
        CS1 = map.contourf(x,y,temp,levels,cmap=cm.get_cmap('jet',len(levels)-1) )#,alpha=0.5)
98
        CS1 = map.contourf(x,y,temp,levels,cmap=cm.get_cmap('jet',len(levels)-1) )#,alpha=0.5)
94
99
        plt.colorbar(CS1,orientation='vertical',extend='both', shrink=0.5)
95
        #plt.colorbar(orientation='horizontal')     
100
        #plt.colorbar(orientation='horizontal')     
96
    #CS2 = contour(x,y,temp,CS1.levels[::2],
101
    #CS2 = contour(x,y,temp,CS1.levels[::2],
97
    #                    colors = 'k',
102
    #                    colors = 'k',

Updated soda2roms.py Download diff

107108
52
            
52
            
53
    #if var in ['temperature','salinity']:
53
    #if var in ['temperature','salinity']:
54
    #    for k in range(grdROMS.Nlevels):
54
    #    for k in range(grdROMS.Nlevels):
55
    #        plotData.contourMap(grdROMS,grdMODEL,np.squeeze(outdata[k,:,:]),k,var)
55
        plotData.contourMap(grdROMS,grdMODEL,np.squeeze(outdata[34,:,:]),34,var)
56
        return outdata
56
        return outdata
57
        
57
        
58
        
58