Skip to content

Commit

Permalink
Data sample
Browse files Browse the repository at this point in the history
  • Loading branch information
cfontana00 committed Mar 21, 2024
1 parent a4d4cb2 commit d451896
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 7 deletions.
4 changes: 2 additions & 2 deletions config/config_TEMPLATE.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

"date_ini":"2021-12-11",
"date_end":"2021-12-12",
"outdir":"/home/fontana/MODEL/OUTPUTS",
"diagdir":"/home/fontana/MODEL/DIAGS",
"outdir":"/path/to/OUTPUT_SMP",
"diagdir":"/path/to/diags/dir",
"river_ini":"2015-01-03",
"river_end":"2015-05-01",

Expand Down
50 changes: 50 additions & 0 deletions datasets/CMEMS/motu_downloader.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"motu_user": "XXXXXX",
"motu_password": "XXXXX",
"domain_lat_min": 41.88515625,
"domain_lat_max": 44.50234375,
"domain_lon_min": 6.06640625,
"domain_lon_max": 12.18359375,
"domain_depth_min": 0.0,
"domain_depth_max": 2900.0,
"days_before": 0,
"days_after": 2,
"motu_server": "http://nrt.cmems-du.eu/motu-web/Motu",
"services": [
{
"name": "MEDSEA_ANALYSISFORECAST_PHY_006_013",
"products": [
{
"name": "cmems_mod_med_phy-cur_anfc_4.2km_P1D-m",
"variables": ["uo", "vo"]
},
{
"name": "cmems_mod_med_phy-sal_anfc_4.2km_P1D-m",
"variables": ["so"]
},
{
"name": "cmems_mod_med_phy-tem_anfc_4.2km_P1D-m",
"variables": ["thetao"]
}
]
},
{
"name": "MEDSEA_ANALYSISFORECAST_BGC_006_014",
"products": [
{
"name": "cmems_mod_med_bgc-nut_anfc_4.2km_P1D-m",
"variables": ["no3", "po4","nh4", "si"]
},
{
"name": "cmems_mod_med_bgc-bio_anfc_4.2km_P1D-m",
"variables": ["o2"]
},
{
"name": "cmems_mod_med_bgc-car_anfc_4.2km_P1D-m",
"variables": ["dissic","talk"]
}
]
}
]
}

Binary file removed datasets/MY_NEW_DATA/.my_new_routine.py.swp
Binary file not shown.
Binary file modified manual.pdf
Binary file not shown.
Binary file modified modules/__pycache__/fun_gen.cpython-310.pyc
Binary file not shown.
15 changes: 13 additions & 2 deletions modules/fun_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ def load_config(config):

os.system('mkdir -p '+diagdir+'/'+config)

print('=> Config file loaded')
print('---------------------\n')
print('----------------------------------')
print('=> Config file '+config+' loaded')
print('----------------------------------')


# ---------------------------------- #
Expand All @@ -58,6 +59,16 @@ def load_variable(config,var):
for par in pars:
if par[0] == var:
break

print('----------------')
print('Variable :',var)
print('cmap :',par[2])
print('log :',par[3])
print('min/max mode :',par[4])
print('vmin :',par[5])
print('vmax :',par[6])
print('----------------\n')


return par[0],\
par[1],\
Expand Down
Binary file removed plot/.make_plot_2D.ksh.swp
Binary file not shown.
2 changes: 1 addition & 1 deletion plot/make_plot_2D.ksh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ config=$1
#varlist={'so','thetao'}
#levlist={'0','1'}

varlist='thetao'
varlist='chl'
levlist='0'


Expand Down
4 changes: 3 additions & 1 deletion plot/make_plot_2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
from cartopy.mpl.gridliner import LONGITUDE_FORMATTER, LATITUDE_FORMATTER
import matplotlib.colors as colors
import matplotlib.pyplot as plt
import cmocean
import cmcrameri



# Get args
Expand Down Expand Up @@ -86,7 +89,6 @@
else:
p = plt.pcolor(lon,lat,var2d,cmap=cmap,norm=colors.LogNorm(vmin=vmin,vmax=vmax),zorder=1)


if jd == jdini: # plot cb only once
cb = plt.colorbar(extend='both',fraction=float(cb_fraction_2D),pad=float(cb_pad_2D),\
label=label+' ('+units+')')
Expand Down
2 changes: 1 addition & 1 deletion plot/make_plot_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
plt.xlabel("Latitude (°)")

savefig( odir+'/'+dtag+'_'+var+'.'+fig_fmt)
plt.show()
#plt.show()
plt.close()


Expand Down

0 comments on commit d451896

Please sign in to comment.