420 likes | 571 Views
CHyM tutorial. Marco Verdecchia – Trieste, September 8/9, 2011. Outline. Few suggestions ( my opinion, not Gospel! ) Quick description of CHyM user interface Homework Using CHyM to rebuild the basin DN (today) Modify CHyM to refine parameterization or calibration.
E N D
CHyM tutorial Marco Verdecchia – Trieste, September 8/9, 2011
Outline • Few suggestions (my opinion, not Gospel!) • Quick description of CHyM user interface • Homework • Using CHyM to rebuild the basin DN (today) • Modify CHyM to refine parameterization or calibration
What happens if you run a numerical model? Normal condition Very rare event It does not work properly It works properly Code problem Parameterization problem
CHyM is a complex numerical model, few preliminary steps are needed before to use of modify it. • Understand what happens running it as it is • What happens if you change a single parameter • Modify only one parameter!! • Add a wrong line in the code and see what happens… • Try to apply CHyM to a basin you are familiar with
CHyM: install procedures tar –xvf /afs/ictp/public/shared/smr2262/chym.tar.gz Create a chym directory with the chym code
What CHyM directory will contain chym script -> /home/netapp-clima/scratch/museo chymlib.a museo If NCAR Graphic package is available You may want to use CHyM graphic tools ncarg -> /home/netapp-clima/scratch/ncarg bin/ chymlab
What happens if you run CHyM script? • The CHyM fortran code is created using the value of few csh parameters you set • The fortran code is compiled and linked with CHyM libraries to create the executable • Run chym executable that use museo db. • Delete all the unneeded files chym Output run compilation chym.f chym.exe chymlib.a museo files ncarglib
Run CHyM script and check if it actually happen... tar –xvf /afs/ictp/public/shared/smr2262/chym.tar.gz cd chym ./chym
CHyM script parameters (1) CHyM parameters affecting CHyM output file
CHyM script parameters (2) CHyM parameters affecting CHyM output file
CHyM script parameters (3) CHyM parameters affecting Prec./Temp input Temperature field from MM5 Temperature field after CA algorithm ERA40-ERAInterim
CHyM script parameters (4) CHyM parameters affecting Graphic output
Using CHyM Model (1) Add error(s) to CHyM code and check what happen Set TITLE “CHyM 4.66 – ICTP School” Set TITLE “CHyM 4.66 – ICTP School do ih=1,nsli call groundwater do ih=1,nsli hello call groundwater
CHyM: script set NLON = 300 # number of longitudes set NLAT = 175 # number of latitudes set SLON = 6.50 # 1st longitude set SLAT = 43.80 # 1st latitude set DIJ = 0.020 # lat-lon resolution set DEMF = 3 # 1 Italy, 2 world, 3 both NLAT SLON,SLAT NLON
Where CHyM script parameters are listed? (0) http://cetemps.aquila.infn.it/mvlib/11.html • It contains: • A table with the list and the documentation of the utilities included in the chymlib.a library. You may want to use this tools to develop your application • A table with the information contained in the header of CHyM output files • A table with CHyM script parameters • It will contain (next week): • A link to this presentation • A link to the kit to the updated CHyM model kit (chym.tar.gz) • A link to the reference manual (we are writing it…)
CHyMLab utility (1) • Requires that NCAR Graphic libraries are installed on your platform and allows to produce different graphic output • Allows offline analysis of CHyM output file • Interactive and bach interface • Provided but not supported… error may occurr. Bugs will be fixed, check new versions often
CHyMLab utility (2) If you have not the “current directory” in the path you have to have to Invoke the utility specifying the path, namely: ./chymlabtmp/00123100.chym
CHyMLab utility (7) CHyMLab> plot riverbasin 44
Modify CHyM code (0) An example. Use of a different DEM. Two different approaches: 1. Just wait… we are planning to include a more resolute DEM (100 m) for all the world 2. …be patient… (remember the first slide of this presentation) 2a. Before to edit any file, understand what you have to do 2b. Look the CHyM code and understand where to modify 2c. Implement the code
Modify CHyM code (1) Your data: LAT LON hsl (m) 41.50 30.20 100.5 ….. ….. …. Array dem inside CHyM code Calculate i,j 100.5