Presentation is loading. Please wait.

Presentation is loading. Please wait.

CHyM tutorial Marco Verdecchia – Trieste, September 8/9, 2011.

Similar presentations


Presentation on theme: "CHyM tutorial Marco Verdecchia – Trieste, September 8/9, 2011."— Presentation transcript:

1 CHyM tutorial Marco Verdecchia – Trieste, September 8/9, 2011

2 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

3 What happens if you run a numerical model? It does not work properly It works properly Code problem Parameterization problem Normal condition Very rare event

4  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 is a complex numerical model, few preliminary steps are needed before to use of modify it.

5 tar –xvf /afs/ictp/public/shared/smr2262/chym.tar.gz CHyM: install procedures Create a chym directory with the chym code

6 -> /home/netapp-clima/scratch/museo What CHyM directory will contain ncarg -> /home/netapp-clima/scratch/ncarg bin/ chymlab If NCAR Graphic package is available You may want to use CHyM graphic tools chymlib.a chym script museo

7 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.fchym.exe chymlib.a ncarglib compilation run chym Output museo files

8 Run CHyM script and understand what is happening(1)

9 Run CHyM script and understand what is happening(2)

10 Run CHyM script and understand what is happening(3)

11 Run CHyM script and understand what is happening(4)

12 Run CHyM script and understand what is happening(5)

13 Run CHyM script and check if it actually happen... tar –xvf /afs/ictp/public/shared/smr2262/chym.tar.gz cd chym./chym

14 What you need to modify inside CHyM script

15 CHyM script parameters (1) CHyM parameters affecting CHyM output file

16 CHyM script parameters (2) CHyM parameters affecting CHyM output file

17 CHyM script parameters (3) CHyM parameters affecting Prec./Temp input ERA40-ERAInterim Temperature field from MM5 Temperature field after CA algorithm

18 CHyM script parameters (3)

19

20 CHyM script parameters (4) CHyM parameters affecting Graphic output

21 Using CHyM Model (1) Add error(s) to CHyM code and check what happen Set TITLE “CHyM 4.66 – ICTP School” do ih=1,nsli call groundwater do ih=1,nsli hello call groundwater Set TITLE “CHyM 4.66 – ICTP School

22 What you need to modify inside CHyM script

23 set NLON = 300 # number of longitudes set NLAT = 175 # number of latitudes set SLON = 6.50 # 1st longitude set SLAT = 43.80 # 1st latitude CHyM: script set DIJ = 0.020 # lat-lon resolution set DEMF = 3 # 1 Italy, 2 world, 3 both NLAT NLON SLON,SLAT

24 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…)

25 Where CHyM script parameters are listed? (1)

26 Where CHyM script parameters are listed? (2)

27 Where CHyM script parameters are listed? (3)

28 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

29 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:./chymlab tmp/00123100.chym If you have not the “current directory” in the path you have to have to Invoke the utility specifying the path, namely:./chymlab tmp/00123100.chym

30 CHyMLab utility (3)

31 CHyMLab utility (4)

32 CHyMLab utility (5)

33 CHyMLab utility (6)

34 CHyMLab utility (7) CHyMLab> plot riverbasin 44

35 CHyM code (1)

36 CHyM code (2)

37 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

38 Modify CHyM code (1) Array dem inside CHyM code Your data: LAT LON hsl (m) 41.50 30.20 100.5 ….. ….. …. Calculate i,j 100.5

39 Modify CHyM code (2)

40 Modify CHyM code (3)

41 Modify CHyM code (4)


Download ppt "CHyM tutorial Marco Verdecchia – Trieste, September 8/9, 2011."

Similar presentations


Ads by Google