From 795b1548ac5dbe028151d9cddb38af2349a2663d Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 17 Oct 2024 15:29:50 +0200 Subject: [PATCH 1/2] make sure actual fesom2 netcdf restart files for oce, ice and icepack can be read with tripyview --- tripyview/sub_data.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tripyview/sub_data.py b/tripyview/sub_data.py index efb4b3a..1330bb2 100755 --- a/tripyview/sub_data.py +++ b/tripyview/sub_data.py @@ -544,10 +544,13 @@ def do_fnamemask(do_file,vname,runid,year): ____________________________________________________________________________ """ - if do_file=='run' : fname = '{}.{}.{}.nc'.format( vname,runid,year) - elif do_file=='restart_oce': fname = '{}.{}.oce.restart.nc'.format(runid,year) - elif do_file=='restart_ice': fname = '{}.{}.ice.restart.nc'.format(runid,year) - elif do_file=='blowup' : fname = '{}.{}.oce.blowup.nc'.format( runid,year) + if do_file=='run' : fname = '{}.{}.{}.nc'.format( vname,runid,year) + elif do_file=='restart_oce' : fname = '{}.{}.oce.restart/{}.nc'.format(runid,year,vname) + elif do_file=='restart_ice' : fname = '{}.{}.ice.restart/{}.nc'.format(runid,year,vname) + elif do_file=='restart_icepack': fname = '{}.{}.icepack.restart/{}.nc'.format(runid,year,vname) + elif do_file=='blowup' : fname = '{}.{}.oce.blowup.nc'.format( runid,year) + #elif do_file=='restart_oce': fname = '{}.{}.oce.restart.nc'.format(runid,year) + #elif do_file=='restart_ice': fname = '{}.{}.ice.restart.nc'.format(runid,year) #___________________________________________________________________________ return(fname) From 92887217dcc9f3c4ff7f069491794afb00e1053d Mon Sep 17 00:00:00 2001 From: Patrick Date: Thu, 17 Oct 2024 15:32:05 +0200 Subject: [PATCH 2/2] improve computation of optimal cref value in case of larger numbers --- tripyview/sub_plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tripyview/sub_plot.py b/tripyview/sub_plot.py index 406ae81..4f2ca2c 100755 --- a/tripyview/sub_plot.py +++ b/tripyview/sub_plot.py @@ -5853,7 +5853,7 @@ def do_setupcinfo(cinfo, data, do_rescale, mesh=None, tri=None, do_vec=False, new_cref = np.around(cref, ini_dez-dez) #print(prev_cref, new_cref, dez, ini_dez-dez) #if (new_crefcref+dc/10 or prev_cref==new_cref) and dez!=0: - if (new_crefcref+dc/10 or dez>10) and dez!=0: + if (new_crefcref+dc/10 or dez>25) and dez!=0: break else: dez=dez+1