Issues with latlon exe file while computing trajectories over the whole domain

General questions and postings pertaining to the use of HYSPLIT regardless of the platform. For platform specific questions, use the HYSPLIT Platform forums.
Post Reply
azare
Posts: 3
Joined: September 27th, 2022, 6:08 pm
Registered HYSPLIT User: Yes

Issues with latlon exe file while computing trajectories over the whole domain

Post by azare »

Hi,

Using Matrix, in linux, I am going to calculate forward trajectories for a domain with 486*534 grid cells and 2km resolution on Lambert Conformal projection. However, I struggle with few problems, see below please. Any help would be truly appreciated.

1) At the control file, latitudes and longitudes that are produced by latlon exe file are not corresponding to lats and longs of grid points which I can read from the MET file with NCL, not only the positions but also the total number. They should be 259524 but latlon file gives 294640 grid cells!

2) On the second line of the control file, where the number of grid cells (294640) should be written, I find " ******** " . To fix this, I simply edit the control file but in follow

3) when I run the hysplit model to produce trajectories for grid cells it gives a warning message that says: "WARNING main: number of sources reduced to -       278530"!!!

4)In addition I got an error message that says: "*ERROR* metpos: start point not within (x,y,t) any data file  - start location outside of domain -    1.31448364      0.951416016    STOP 900". 

However, I am pretty sure the location that I gave to the script as lower left corner and upper right corner are the same as the values that I can read from chkfile.txt that describes my Met data.

Any insight or help that you can provide for dealing with these issues are much appreciated.
Thanks
alicec
Posts: 411
Joined: February 8th, 2016, 12:56 pm
Registered HYSPLIT User: Yes

Re: Issues with latlon exe file while computing trajectories over the whole domain

Post by alicec »

Can you please attach or copy the CONTROL file you are using as input into the latlon program?

Points that are within 2 grid cells of the edge of the meteorological grid are considered outside of the domain.
So if you are trying to give starting locations that are on the very edge of the meteorological grid, you will get that error message.
If you want to run from those points then consider using two meteorological grids. Use global met data with coarse resolution as well as
the data that you are using.

https://www.ready.noaa.gov/hysplitusersguide/S310.htm
Number of input data grids

Default: 1

Number of simultaneous input meteorological files. The following two entries (directory and name) will be repeated this number of times. A simulation will terminate when the computation is off all of the grids in either space or time. Calculations will check the grid each time step and use the finest resolution input data available at that location at that time. When multiple meteorological grids have different resolution, there is an additional restriction that there should be some overlap between the grids in time, otherwise it is not possible to transfer a particle position from one grid to another. If multiple grids are defined and the model has trouble automatically transferring the calculation from one grid to another, the sub-grid size may need to be increased to its maximum value.
azare
Posts: 3
Joined: September 27th, 2022, 6:08 pm
Registered HYSPLIT User: Yes

Re: Issues with latlon exe file while computing trajectories over the whole domain

Post by azare »

Thank you very much for your response. I really appreciate it. 
Here it is the CONTROL file that I use as input for the latlon program:


20 01 04 17
3
32.4578 -124.403 500.0
41.9607 -112.911 500.0
32.4767 -124.382 500.0
60
10000.0
1
/fire6/azz/CA_Project/MET_HYSPLIT_ready/
WRFDATA_2020_01.ARL
/fire6/azz/CA_Project/Output_Hysplit/
fdump
     

Thanks for sharing the fact about grid cells of the edge.
Considering this and skipping them, problem #4 was solved, but problems #1-3 still exist. In addition, when I try to plot it by trajplot I get the segmentation fault error. Please see below.

${MDL}/exec/trajplot -v0 -z80 -j${MDL}/graphics/arlmap -ifdump

Started Trajectory Drawing 
HYSPLIT version: hysplit.v5.2.1 
Last Changed Date: 2022-05-16
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:#0  0x7FF733ECF6D7#1  0x7FF733ECFD1E#2  0x7FF7333CA3FF#3  0x436A73 in trjinp_#4  0x404833 in MAIN__ at trajplot.f:?
./traj_space.sh: line 56: 224955 Segmentation fault      (core dumped) ${MDL}/exec/trajplot -v0 -z80 -j${MDL}/graphics/arlmap -ifdump

Thanks for your insight and help
alicec
Posts: 411
Joined: February 8th, 2016, 12:56 pm
Registered HYSPLIT User: Yes

Re: Issues with latlon exe file while computing trajectories over the whole domain

Post by alicec »

The **** is just caused because the latlon program wasn't taking into account that someone would
run so many trajectories altogether.

So it looks like your span is

11.492 degrees longitude
9.5029 degrees latitude

Then your increment is
0.021 degrees longitude
0.0189 degrees latitude

This gives about 548 points in longitude direction and 504 points in latitude direction.
Which gives 276,192 source points altogether. That's what I'm getting from your CONTROL file
with the caveat that I assume you added in the vertical motion line after the runtime of 60.

Why do you think it should be 259524?

I suggest you start with a larger and more even spacing - something like 1 x 1 degree and see if that works.
Then gradually reduce the spacing.

20 01 04 17 00
3
32.4578 -124.4030 500.0
41.9607 -112.9110 500.0
33.4578 -125.4030 500.0
60
0
1000
2
/pub/archives/wrf27km/inst/2020/
wrfout_d01_20200104.ARL
/pub/archives/wrf27km/inst/2020/
wrfout_d01_20200105.ARL
./
fdump
azare
Posts: 3
Joined: September 27th, 2022, 6:08 pm
Registered HYSPLIT User: Yes

Re: Issues with latlon exe file while computing trajectories over the whole domain

Post by azare »

Thank you very much Alicec for your reply. 

Attached please see the lats and longs both from my MET file that is read using NCL script and from the CONTROL file, which I got as output from the latlon program. I believe that the total number of source points is 259524 because it should be equivalent to my grid points i*j (486*534). The number of grid points given in my output file from NCL is the same. 

My assumption is that the default setup for map projection in the latlon program is Conformal as well. So, the space between grid points, in different positions in the domain, should not be the same in degree. right? Could it be the source of this discrepancy? I am thinking if there is any set up option for the latlon program to provide map projection of the met data, which I probably miss? or if there is an option for the grid spacing by km, while calculating grid points?


I do agree with you that the number of trajectories which I need for this project are sooo many and by trying larger spacing it works. However, it still reduces the number of sources (#3 above).

Thank you

PS., lats and longs for lower left corner, upper right corner and the third point at the CONTROL file that I sent you before were points that were within 2 grid cells of the edge of the meteorological grid. The CONTROL file was updated based on your suggestion. Please see lat_lon.txt.
Attachments
lat_lon.txt
(9.49 MiB) Downloaded 285 times
CONTROL.txt
(7.59 MiB) Downloaded 285 times
alicec
Posts: 411
Joined: February 8th, 2016, 12:56 pm
Registered HYSPLIT User: Yes

Re: Issues with latlon exe file while computing trajectories over the whole domain

Post by alicec »

The latlon program is just doing something very simple.
It is creating the starting trajectory points on a regular lat-lon grid.
Beginning and ending points are given by the first and second line.
Spacing is given by the difference between the first and third lines.

It isn't matching the grid points in your met file.

As the CONTROL file is just a text file and relatively simple, we suggest
that users who want to do something more complicated write a script
to create their own CONTROL file.

In this case you could read in the latlon.txt you have provided and
then write your own control file using those points.

Also if you want to run that many trajectories, you may want to split it up into
separate smaller runs which you can either run simultaneously or sequentially.

Hope that helps
Post Reply

Return to “Users”