Skip to content

Commit

Permalink
Livorno update
Browse files Browse the repository at this point in the history
  • Loading branch information
cfontana00 committed Dec 4, 2024
1 parent 90c18b2 commit 0d0d704
Show file tree
Hide file tree
Showing 7 changed files with 839 additions and 2,248 deletions.
3 changes: 2 additions & 1 deletion datasets/RIVERS/read_rivers.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ def argument():
try :
raw=np.loadtxt('data_modif/'+name+'_modif.csv',skiprows=1,dtype=str)
print('[FILE READ]','data_modif/'+name+'_modif.csv')
except :
except Exception as e:
print(e)
raw=np.loadtxt('data/'+name+'.csv',skiprows=1,dtype=str)
print('[FILE READ]','data/'+name+'.csv')

Expand Down
8 changes: 4 additions & 4 deletions la_totale.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ config=$1
# Get CMEMS data
cd datasets/CMEMS

for var in 'thetao' 'chl';do
python3 get_data_sat.py -c $config -v $var
python3 interp_cmems.py -c $config -v $var
done
#for var in 'thetao' 'chl';do
# python3 get_data_sat.py -c $config -v $var
# python3 interp_cmems.py -c $config -v $var
#done


# Do plots
Expand Down
803 changes: 803 additions & 0 deletions meteo/ECMWF/dl.out

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions meteo/ECMWF/get_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def argument():

for mon in range(np.amin(months),np.amax(months)+1):


for var in ['10m_wind_direction','10m_wind_speed',\
'2m_temperature','2m_relative_humidity',\
'surface_net_solar_radiation','surface_net_thermal_radiation',\
Expand All @@ -90,6 +89,9 @@ def argument():
try:
oname = savedir+'/'+name+'_'+str(year)+str(mon).zfill(2)+'_'+var+'.nc'


print('Downloading',name+'_'+str(year)+str(mon).zfill(2)+'_'+var+'.nc\n')

c.retrieve(
name,
{
Expand Down Expand Up @@ -125,12 +127,12 @@ def argument():
# Crop file
# ---------
os.system('ncks -O -d x,'+imin+','+imax+' -d y,'+jmin+','+jmax+' '+oname+' '+oname)
print('\n[DOWNLOADED]',oname,'\n')

break
except:
pass


print('\n[DOWNLOADED]',oname,'\n')


Loading

0 comments on commit 0d0d704

Please sign in to comment.