linjonathan / tropical_cyclone_risk

A Physics-Based, Tropical Cyclone Downscaling Model
MIT License
23 stars 11 forks source link

Create new basin files in ./tropical_cyclone_risk/land/ #3

Open alexandrefierro opened 7 months ago

alexandrefierro commented 7 months ago

Greetings:

I created a new basin "TR" in the namelist - How do I create the TR.nc file that goes into ./tropical_cyclone_risk/land/ as run.py does not create any new basin entries automatically (i.e., pre-processing is needed). Thank you!

basin_bounds = {'EP': ['180E', '0N', '290E', '60N'], 'NA': ['260E', '0N', '360E', '60N'], 'NI': ['30E', '0N', '100E', '50N'], 'SI': ['20E', '45S', '100E', '0S'], 'AU': ['100E', '45S', '180E', '0S'], 'SP': ['180E', '45S', '250E', '0S'], 'WP': ['100E', '0N', '180E', '60N'], 'TR': ['275E', '0N', '335E', '30N'], 'GL': ['0E', '90S', '360E', '90N']}

alexandrefierro commented 7 months ago

I figured it out:

(i) make the changes in scripts/generate_land_masks.py (ii) execute run.py with the new basin acronym as sysarg(1) and the code generates the lansmask. I initially tried to execute "scripts/generate_land_masks.py" but did not realize that this subroutine was called in the namelist. The new basin key has to be added in lat_vort_power and atm_bl_depth before running.

Minor NB: the lat lon ranges in the namelist for some basins does not match those defined in cripts/generate_land_masks.py - but that can be easily changed.

NB2: Would you have a sample Python code that could use to plot the tracks in your model netcdf output color coded by intensity? This would be really useful! Thank you.

linjonathan commented 6 months ago

Great to hear!

The ranges in the namelist determines the random seeding area, while the ranges in the generate_land_masks.py script is used to generate the land mask for that basin. They should be the same, thanks for the headsup.

On the second point, I didn't provide plotting code because it often requires graphical packages that I didn't want to include in this repository. But I'll keep it in the back of my mind!