Re: [pitlakq-users] Data Ouput Forms

20 views
Skip to first unread message
Message has been deleted

Dr. Mike Mueller

unread,
Feb 21, 2020, 3:56:02 AM2/21/20
to pitlak...@googlegroups.com
Hi Anne,

The tutorial [1] only shows how to make a plot:

from pitlakq.postprocessing import depth_time_contour

species=[{"name": "t2", "levels": "auto"}]
depth_time_contour.main("../output/w2/out.nc",
species=species,
location=5)

But you can also save the data for all given species. This is an example:

from pitlakq.postprocessing import depth_time_contour

contour = depth_time_contour.Contour(
output_file_name='../output/w2/out.nc',
location=5,
species=[{'name': 't2', 'levels': 'auto'},
target_path='../output/w2'
)
contour.read_data()
contour.save()


This should create a file ../output/w2/t2.txt with all data for this location.
You can add different constituents such as:

species=[{'name': 't2', 'levels': 'auto'},
{"name": "ca", "levels": "auto"}]

You can also limit the outputted dates with a time slot. For example, only for
the year 2002:

depth_time_contour.Contour( .... # all from above
time_slot=(datetime.datetime(2002, 1, 1),
datetime.datetime(2003, 1, 1)),
)

HTH.

Best,
Mike

[1] https://pitlakq.readthedocs.io/en/latest/tut.html#looking-at-results


Am 20.02.20 um 17:24 schrieb Anna Klein:
> Hi Mike,
>
> Thanks for all your help so far getting started with PITLAKQ!
>
> While working through the tutorials and making my own test project, I noticed
> that there is not any instruction on how to export the data from the modeling
> done in PITLAKQ to a spreadsheet form.  Can this be done?  It would be very
> helpful for visualizing the modeled profile at different time steps against
> real-world data for my project.  For example, is there a way to take the data
> that is generated to create the out.nc file and export it to a readable
> spreadsheet format (showing date, time, modeled parameters at that time step,
> etc.)?  Currently the only way I have been able to view all the data is using
> the ncdump command - I have tried a couple of file conversion options, but none
> of them seem to work very well.  Perhaps I am just missing an obvious solution
> here.
>
> Cheers,
> Anna
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "pitlakq-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pitlakq-user...@googlegroups.com
> <mailto:pitlakq-user...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/pitlakq-users/8d2826a2-974a-441b-a8a4-d3c212eb349d%40googlegroups.com
> <https://groups.google.com/d/msgid/pitlakq-users/8d2826a2-974a-441b-a8a4-d3c212eb349d%40googlegroups.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages