Problem in ConverToHDF5

Discussion about MOHID support tools
jmsole@meteosim.com
MOHID Beginner
Posts: 6
Joined: Mon Feb 27, 2012 08:26

Problem in ConverToHDF5

Postby jmsole@meteosim.com » Mon Mar 05, 2012 10:31

Good morning all,

I am trying to create hdf5 files from WRF netcdf files. For that I try
to use ConvertToHDF5 executable with the following
ConvertToHDF5Action.dat file:

<begin_file>

ACTION : CONVERT WRF FORMAT

FILENAME : wrfout_d01_2012-03-02_00.nc

OUTPUTFILENAME : wrfout_d01.hdf5

OUTPUT_GRID_FILENAME : wrfout_d01.dat

COMPUTE_WINDSTRESS : 1

COMPUTE_RELATIVE_HUMIDITY : 0

COMPUTE_PRECIPITATION : 0

COMPUTE_MSLP : 0

COMPUTE_WINDMODULUS : 1

WRITE_XYZ : 0

WRITE_TERRAIN : 0

OUTPUT_DT : 0



START : 2010 03 02 00 00 00

END : 2010 03 02 00 00 00



<<BeginFields>>

wind velocity X

wind velocity Y

<<EndFields>>

<end_file>


I get the following error: ReadOptions - ConvertToHDF5 - ERR210

This error corresponds to this code in the ConvertToHDF5.F90 file :

#ifdef _USE_PROJ4
case(ConvertWRFFormatToHDF5)

call ConvertWRFFormat(ObjEnterData,
ClientNumber, STAT = STAT_CALL)
if(STAT_CALL .ne. SUCCESS_) stop
'ReadOptions - ConvertToHDF5 - ERR210'
#endif

Do you have any idea what am I doing wrong?

Thanks in advance,

Josep Maria Solé

jmsole@meteosim.com
MOHID Beginner
Posts: 6
Joined: Mon Feb 27, 2012 08:26

Re: Problem in ConverToHDF5

Postby jmsole@meteosim.com » Mon Mar 05, 2012 10:45

Another option for me would be to use Matlab tools
Do anyone know how to get them?

Thank you very much!

Josep Maria Solé

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: Problem in ConverToHDF5

Postby Jauch » Mon Mar 05, 2012 12:28

Hello Josep,

Could you send us your NC file so we can take a look on what is happening?

jmsole@meteosim.com
MOHID Beginner
Posts: 6
Joined: Mon Feb 27, 2012 08:26

Re: Problem in ConverToHDF5

Postby jmsole@meteosim.com » Mon Mar 05, 2012 13:14

Hello Eduardo,

I sent the NC files to eduardo.jauch@ist.utl.pt. Did you received it? It was about 26Mb so I compressed it into a tar.gz file. Moreover, I sent to you the ConvertToHDF5Action.dat

Thank you very much

Josep Maria

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: Problem in ConverToHDF5

Postby Jauch » Mon Mar 05, 2012 14:10

Hi Josep,

I don't know if we are using the same ConvertToHDF5 exe file (I'm using revision 73284).
The first thing is that START and END are the same and the tool ask for different.

If we change END for the next day, a new error message appears, saying that SP1 and SP2 are the same:

Code: Select all

 -------------------------- MOHID -------------------------

       AUTHOR   : IST/MARETEC, Marine Modelling Group
       WWW      : http://www.mohid.com


 Copyright (C) 1985, 1998, 2002, 2006.
 Instituto Superior Tecnico, Technical University of Lisbon
 -------------------------- MOHID -------------------------

 Constructing ConvertToHDF5
 Please Wait...

 Running ConvertToHDF5...

 CONVERT WRF FORMAT

 ---------------------------

 Reading WRF output file...
 ndims =           9
 nvars =         136
 natts =          86
 unlimitedDimId =            1
     1                Time    1
     2          DateStrLen   19
     3           west_east  149
     4         south_north   99
     5          bottom_top   27
     6     bottom_top_stag   28
     7    soil_layers_stag    4
     8      west_east_stag  150
     9    south_north_stag  100
 Reading Geometry...
 proj=lcc            ellps=sphere        lat_1=  37.205
 lat_2=  37.205      lon_0=   1.671      lat_0=  37.205


 Constructing grid...
 Using Lambert Conformal Conic Projection
 with parameters :
 SP1                  =    37.20500
 SP2                  =    37.20500
 Reference Longitude  =    1.670990
 Reference Latitude   =    37.20501

 sp1 must be lower than sp2
 sp1 =    37.2050018310547
 sp2 =    37.2050018310547
LambertConformalConicProj_ToMetric - ModuleFunctions - ERR01

E:\Tools\HDF\ConvertToHDF>pause
Press any key to continue . . .


These are Latitudes that are inside your NC file...
Could you check this?

jmsole@meteosim.com
MOHID Beginner
Posts: 6
Joined: Mon Feb 27, 2012 08:26

Re: Problem in ConverToHDF5

Postby jmsole@meteosim.com » Mon Mar 05, 2012 15:49

Hi Eduardo,

I don't know how I can check if my version of ConverToHDF5.exe is the same as yours. I am using a version created in April 2008.

The NC file I just sent to you is related to an unique time step. That is why the START and END have the same value. That means that I have several separeted NC files conforming a time series.

However, I think that my problem starts before reading the NC file, since The error that I get is "ReadOptions - ConvertToHDF5 - ERR210".

Latitudes, longitudes and dimensions that you show in the code are also in the NC file and are correct.

Thank you very much for your help.

Josep Maria Solé

Jauch
Site Admin
Posts: 98
Joined: Thu Jan 01, 1970 00:00

Re: Problem in ConverToHDF5

Postby Jauch » Tue Mar 06, 2012 10:09

Hi Josep :-)

I'll send you (by e-mail) a new ConvertToHDF5 with some corrections. Thanks for helping us with that ;-)
The main change is that now you can use a nc file with the lambert SP1 and SP2 parameters been the same.

Rosa ask me to tell you that due to the extent of the area in your image, maybe it would be better to use sp1 = 30 and sp2 = 60, otherwise, I think (if I understood right), you will have distortions in your image...

Another thing...

Even the file containing only one time instant, when converting to HDF5 with the ConvertToHDF5, it's required the END instant to be greater than START. A second will do the trick:

START : 2012 3 2 0 0 0
END : 2012 3 02 0 0 1

(I changed from 2010 to 2012 because the time in your file is 2012)

I think it's all...
Good luck :-)

jmsole@meteosim.com
MOHID Beginner
Posts: 6
Joined: Mon Feb 27, 2012 08:26

Re: Problem in ConverToHDF5

Postby jmsole@meteosim.com » Tue Mar 06, 2012 10:37

Many thanks for helping!

It is working now. I will be taken into account the sp advices for future simulations.

Josep Maria


Return to “MOHID Tools”

Who is online

Users browsing this forum: No registered users and 1 guest