Dear all,
I am using CMS to compute
trajectories of particles inside the Mediterranean Sea using
oceanographic model (Mercator PSY2V4R4). This is a non-regular C-grid.
According to the cms user guide, lon and lat have to be in 1D for the cms code. So I interpolated U, V and W at the center of the grid cell in order to get a A-grid and then I interpolated it on a regular one (please find attached an example file).
From Matlab, here is an ncdisp of my file :
Format:
classic
Global Attributes:
grid_type = 'curvilinear'
Dimensions:
x = 617
y = 473
z = 50
time = 1 (UNLIMITED)
Variables:
Longitude
Size: 617x1
Dimensions: x
Datatype: single
Attributes:
units = 'degree_north'
Latitude
Size: 473x1
Dimensions: y
Datatype: single
Attributes:
units = 'degree_east'
Depth
Size: 50x1
Dimensions: z
Datatype: single
Attributes:
units = 'meter'
zu
Size: 617x473x50x1
Dimensions: x,y,z,time
Datatype: single
Attributes:
long_name = 'Zonal current'
units = 'm/s'
_FillValue = 1.267650600228229e+30
zv
Size: 617x473x50x1
Dimensions: x,y,z,time
Datatype: single
Attributes:
long_name = 'Meridional current'
units = 'm/s'
_FillValue = 1.267650600228229e+30
zw
Size: 617x473x50x1
Dimensions: x,y,z,time
Datatype: single
Attributes:
long_name = 'Vertical current'
units = 'm/s'
_FillValue = 1.267650600228229e+30
But I am
experiencing an issue with the particles released during experiment.
I made sure their starting position is located inside the input grid
1) but with this releaseFile :
1
-11 36.000 0.6 1 2007 1 1 0
1 -8 36.000 0.6 1 2007 1 1
0
1 -3 36.000 0.6 1 2007
1 1 0
1 10 38.000 0.6
1 2007 1 1 0
when I run the CMS code (./cms …) I get the output :
==========================================
File
name : traj_file_1.nc
Total number of release
events : 4 (numbers 1 to 4)
Total
number of particles released : 4
Total number of time
steps : 13
Total
number of time steps in output file:
13
==========================================
WARNING:
Release line
1 is outside of the nest grid
WARNING: Release
line 2 is
outside of the nest grid
WARNING: Release line
3 is outside of the nest grid
So it seems
negatives longitudes doesn’t work
2) but if I try this releaseFile for example :
1 -11 36.000 0.6 1 2007 1 1 0
1 -8 36.000 0.6 1 2007 1 1 0
1 3 38.000 0.6 1 2007 1 1 0
1 10 38.000 0.6 1 2007 1 1 0
I get :
==========================================
File name : traj_file_1.nc
Total number of release events : 4 (numbers 1 to 4)
Total number of particles released : 4
Total number of time steps : 13
Total number of time steps in output file: 13
==========================================
WARNING: Release line 1 is outside of the nest grid
WARNING: Release line 2 is outside of the nest grid
WARNING: Release line 4 is outside of the nest grid
So the line 4 which was previously « ok » isn’t anymore even though I haven’t changed this line in the second experiment.
In any of these two cases the the trajectory for the particles isn't computed because I get for lon and lat:
1) lon
349 352 -3 10
NaN NaN NaN 10
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
lat
36 36 36 10
NaN NaN NaN 10
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
2) lon
349 352 3 10
NaN NaN 3 NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
36 36 38 10
NaN NaN 38 NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
NaN NaN NaN NaN
I guess the issue is linked to the
structure of my input but I haven’t figured out what it is about
yet. Maybe some of you have experienced similar issue ?
Thanks
a lot for your help
Regards,
Mélanie