Geodels / goSPL-examples

Series of examples to illustrate the functionalities of goSPL
GNU General Public License v3.0
1 stars 3 forks source link

Global examples - build_inputs - erodep version - missing grid variables? #3

Open RichardScottOZ opened 2 weeks ago

RichardScottOZ commented 2 weeks ago

I think this is missing the nc250 and nc250 grid variable loading that the continental example has?

# Loading the UGRID file
ufile = input_path+'/mesh_'+str(widthCell)+'km.nc'
ugrid = uxr.open_grid(ufile) 
# ugrid

# Perform the interpolation (bilinear) 
var_path = 'vars_'+str(widthCell)
var_name = 'step_up_250'
ufcts.inter2UGRID(ncgrid_250,ugrid,var_path,var_name,type='face')
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
Cell In[9], line 9
      7 var_path = 'vars_'+str(widthCell)
      8 var_name = 'step_up_250'
----> 9 ufcts.inter2UGRID(ncgrid_250,ugrid,var_path,var_name,type='face')

NameError: name 'ncgrid_250' is not defined
tristan-salles commented 2 weeks ago

Should be ncgrid and not ncgrid_250 (I am changing it right now) also a bit below there is an additional error

data_file = [var_path+'/'+var_name+'.nc']

dt = 1.e6
zkeys = ['h','next_h']
vkeys = ['vx','vy','vz']
# If you have a dynamic topography variable you can specify its corresponding key here for example dkey = ['dynt'] 
dkey = None

dual_mesh = ufcts.get_Tectonic(ufile, data_file, vkeys, zkeys, dkey, dt, mthd='IDW')

Should be replaced with

data_file = [var_path+'/'+var_name+'.nc']
dual_mesh = uxr.open_dataset(ufile, *data_file, use_dual=True)
RichardScottOZ commented 2 weeks ago

and - should this have a data folder with the two netcdfs in it similarly

RichardScottOZ commented 2 weeks ago

Ok - if you update I can pull the change

dual_mesh = uxr.open_dataset(ufile, *data_file, use_dual=True)

thanks will take a look

tristan-salles commented 2 weeks ago

and - should this have a data folder with the two netcdfs in it similarly

Not required in this simulation.