Welcome, Guest
Username: Password: Remember me

TOPIC: converter.py ecmwf2srf

converter.py ecmwf2srf 4 years 1 day ago #37208

  • olslewfoot
  • olslewfoot's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 132
  • Thank you received: 3
A similar question has been asked before but there were no responses.
Can anyone confirm the specification for --bl and --tr when calling the converter.py script. Are these --bl=Lon,Lat ? --tr=Lon,Lat

I'm trying to convert an existing (previously downloaded) file and I've tried every combination of format, using --bl=, (lon,lat) and as many other combinations I can devise but I get an error in the formatting of the X array

converter.py ecmwf2srf --from 2017-01-01 --stop 2017-02-01 --bl=-18,-8 --tr=-13,-3 --dataset ./phy_012017.nc output_era5.slf

utils.exceptions.TelemacException: ... your spatial range seems out of bound:
you asked for [ 352.0-357.0], while x is.....

The array is read correctly from the netcdf file but the bounds entered in the commandline don't match

I could convert the array of the netcdf file, but interested to hear if there is an better method.

Thanks in advance.
JOhn
The administrator has disabled public write access.

converter.py ecmwf2srf 3 years 11 months ago #37277

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Hi john,

Would it be possible to get you netcdf file so I can have a look ?

I had a quick look in the code and coordinates seems indded to be in lat/long.

There might be a bug in the check.

This script is not fully tested so there might still some bugs in it.

Cheers,
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.
The following user(s) said Thank You: olslewfoot

converter.py ecmwf2srf 3 years 11 months ago #37279

  • olslewfoot
  • olslewfoot's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 132
  • Thank you received: 3
Hi Yugi

Thanks for replying but I solved this - and you are right. The check for longitude range as -180<0<+180 or 0<360 is fairly simple in the python3 scripts and this was simply adding 360 if negative, thereby causing the error.

The earlier python2.7 scripts had a different method to make this check which allowed the -180<0<+180 or 0<360 specification.

The netcdf file is too large to upload, but is a standard Mercator product of Global Reanalysis physics 001-030 holding temp, sal, U,V, elev etc.

Thanks
John
The administrator has disabled public write access.
The following user(s) said Thank You: Tian

converter.py ecmwf2srf 3 years 11 months ago #37299

  • yugi
  • yugi's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 851
  • Thank you received: 244
Hi,

Where did you find a version where the test was different ?
I checked in the logs and the test has always been the same.
There are 10 types of people in the world: those who understand binary, and those who don't.
The administrator has disabled public write access.
Moderators: borisb

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.