Skip to content

Commit

Permalink
Updated to woa 18.
Browse files Browse the repository at this point in the history
  • Loading branch information
ledm committed Apr 26, 2023
1 parent 43e52db commit 31a7bb0
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 10 deletions.
12 changes: 9 additions & 3 deletions bgcval2/bgcval2_make_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ def newImageLocation(fn):


if level2Physics or level2_auto:
if level2Physics:
if level2Physics:
l2Fields = [
'Temperature',
'Salinity',
Expand All @@ -978,9 +978,9 @@ def newImageLocation(fn):
region = 'Global'

if level2_auto:
l2Fields = glob(imagedir + '/' + jobID + '/P2Pplots')
l2Fields = glob(imagedir + '/' + jobID + '/P2Pplots/*/*')
l2Fields = [os.path.basename(fn) for fn in sorted(l2Fields)]
levels = ['Surface', '50m', '100m', '200m', '500m', '750m', '1000m', '1500m', '2000m', '4000m','Transect']
levels = ['Surface', '4000m', '2000m', '1000m', '750m','500m','200m', '100m', '50m', 'Transect']
outdict = {}
outlevels = {}
for i, fn in enumerate(l2Fields):
Expand All @@ -1001,6 +1001,7 @@ def newImageLocation(fn):
Descriptions = {}
FileLists = {}
FileOrder = {}
#print(l2Fields, slices)

for key in sorted(l2Fields):
#if key not in ['Alkalinity','Nitrate']: continue
Expand Down Expand Up @@ -1039,6 +1040,11 @@ def newImageLocation(fn):
glob(imagedir + '/' + jobID + '/P2Pplots/*/*' + key +
'*/*/*' + s + '*' + region + '*' + key + '*' +
year + '*robinquad-cartopy.png'))
vfiles.extend(
glob(imagedir + '/' + jobID + '/P2Pplots/*/*' + key +
'*/*/*' + s + '*' + region + '*' + key + '*' +
year + '*.png'))

if s in [
'Transect',
]:
Expand Down
4 changes: 4 additions & 0 deletions bgcval2/p2p/matchDataAndModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ def _convertDataTo1D_(self, ):
'100m',
'200m',
'500m',
'750m',
'1000m',
'2000m',
'4000m',
Expand All @@ -280,6 +281,7 @@ def _convertDataTo1D_(self, ):
if self.depthLevel == '100m': z = 100.
if self.depthLevel == '200m': z = 200.
if self.depthLevel == '500m': z = 500.
if self.depthLevel == '750m': z = 750.
if self.depthLevel == '1000m': z = 1000.
if self.depthLevel == '2000m': z = 2000.
if self.depthLevel == '4000m': z = 4000.
Expand Down Expand Up @@ -1124,6 +1126,8 @@ def var_to_datetime(ncvar):
if units in ['months since 0000-01-01 00:00:00', ]:
units = 'months since 2000-01-01 00:00:00'
return num2date(ncvar[:], 'months since 2000-01-01 00:00:00', calendar='360_day')
elif units.find('months since')>-1:
return num2date(ncvar[:], units, calendar='360_day')

return num2date(ncvar[:], ncvar.units, calendar=calendar)

Expand Down
4 changes: 4 additions & 0 deletions key_files/ma_mld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ modelFiles : $BASEDIR_MODEL/$JOBID/SENEMO*_1m_*grid_T*.nc
gridFile : /data/proteus2/scratch/ledm/MissionAtlantic/SENEMO/eORCA025_mesh_mask_mes_v2.nc
model_convert : choose_best_var
model_vars : somxzint1 mldr10_1
dataFile : $BASEDIR_OBS/WOA/annual/woa18_A5B7_M0200_01.nc
data_vars : M_an
data_convert : NoChange
data_source : WOA13
layers : layerless
regions : Global NorthAtlanticOcean SouthAtlanticOcean EquatorialAtlanticOcean ITCZ
metrics : mean, max #, median, 10pc, 20pc, 30pc, 40pc, 50pc, 60pc, 70pc, 80pc, 90pc, min, max
3 changes: 2 additions & 1 deletion key_files/ma_nitrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ modelFiles : $BASEDIR_MODEL/$JOBID/SENEMO*_1m_*ptrc_T*.nc
gridFile : /data/proteus2/scratch/ledm/MissionAtlantic/SENEMO/eORCA025_mesh_mask_mes_v2.nc
model_vars : N3_n
model_convert : NoChange
dataFile : $BASEDIR_OBS/WOA/annual/woa13_all_n00_01.nc
#dataFile : $BASEDIR_OBS/WOA/annual/woa13_all_n00_01.nc
dataFile : $BASEDIR_OBS/WOA/annual/woa18_all_n00_01.nc
data_vars : n_an
data_convert : NoChange
data_source : WOA13
Expand Down
2 changes: 1 addition & 1 deletion key_files/ma_o2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ dataFile : $BASEDIR_OBS/WOA/annual/woa18_all_o00_01.nc
data_vars : o_an
data_convert : NoChange
data_source : WOA18
layers : 500m #Surface #50m 100m
layers : 500m 750m 1000m #Surface #50m 100m
regions : Global NorthAtlanticOcean SouthAtlanticOcean EquatorialAtlanticOcean
metrics : mean #, median, 10pc, 20pc, 30pc, 40pc, 50pc, 60pc, 70pc, 80pc, 90pc, min, max
3 changes: 2 additions & 1 deletion key_files/ma_phosphate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ modelFiles : $BASEDIR_MODEL/$JOBID/SENEMO*_1m_*ptrc_T*.nc
gridFile : /data/proteus2/scratch/ledm/MissionAtlantic/SENEMO/eORCA025_mesh_mask_mes_v2.nc
model_vars : N1_p
model_convert : NoChange
dataFile : $BASEDIR_OBS/WOA/annual/woa13_all_p00_01.nc
#dataFile : $BASEDIR_OBS/WOA/annual/woa13_all_p00_01.nc
dataFile : $BASEDIR_OBS/WOA/annual/woa18_all_p00_01.nc
data_vars : p_an
data_convert : NoChange
data_source : WOA13
Expand Down
3 changes: 2 additions & 1 deletion key_files/ma_silicate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ modelFiles : $BASEDIR_MODEL/$JOBID/SENEMO*_1m_*ptrc_T*.nc
gridFile : /data/proteus2/scratch/ledm/MissionAtlantic/SENEMO/eORCA025_mesh_mask_mes_v2.nc
model_vars : N5_s
model_convert : NoChange
dataFile : $BASEDIR_OBS/WOA/annual/woa13_all_i00_01.nc
#ataFile : $BASEDIR_OBS/WOA/annual/woa13_all_i00_01.nc
dataFile : $BASEDIR_OBS/WOA/annual/woa18_all_i00_01.nc
data_vars : i_an
data_convert : NoChange
data_source : WOA13
Expand Down
3 changes: 2 additions & 1 deletion key_files/ma_sss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ modelgrid : eORCA025
modelFiles : $BASEDIR_MODEL/$JOBID/SENEMO*_1m_*grid_T*.nc
gridFile : /data/proteus2/scratch/ledm/MissionAtlantic/SENEMO/eORCA025_mesh_mask_mes_v2.nc
model_vars : so_abs so
dataFile : /data/sthenno1/scratch/ledm/Observations/WOA/annual/woa13_decav_s00_01v2_AMM.nc
# dataFile : /data/sthenno1/scratch/ledm/Observations/WOA/annual/woa13_decav_s00_01v2_AMM.nc
dataFile : /data/sthenno1/scratch/ledm/Observations/WOA/annual/woa18_decav_s00_01.nc
data_vars : s_an
data_convert : NoChange
data_source : WOA13
Expand Down
3 changes: 2 additions & 1 deletion key_files/ma_sst.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ modelFiles : $BASEDIR_MODEL/$JOBID/SENEMO*_1m_*grid_T*.nc
gridFile : /data/proteus2/scratch/ledm/MissionAtlantic/SENEMO/eORCA025_mesh_mask_mes_v2.nc
model_vars : thetao thetao_con votemper
model_convert : choose_best_var
dataFile : /data/sthenno1/scratch/ledm/Observations/WOA/annual/woa13_decav_t00_01v2_AMM.nc
#dataFile : /data/sthenno1/scratch/ledm/Observations/WOA/annual/woa13_decav_t00_01v2_AMM.nc
dataFile : /data/sthenno1/scratch/ledm/Observations/WOA/annual/woa18_decav_t00_01.nc
data_vars : t_an
data_convert : NoChange
data_source : WOA13
Expand Down
2 changes: 1 addition & 1 deletion key_lists/missionatlantic_p2p.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ keys:
#MA_Drake: True
#MA_AMOC_26N: True
#MA_ZOS: True
# MA_MLD: True
#MA_MLD: True
#MA_MLD_Sigma: True

# Ice
Expand Down

0 comments on commit 31a7bb0

Please sign in to comment.