chym tutorial

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

Upload: jayme

Post on 25-Feb-2016

27 views

Category:

Documents


4 download

DESCRIPTION

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. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CHyM tutorial

CHyM tutorial

Marco Verdecchia – Trieste, September 8/9, 2011

Page 2: CHyM tutorial

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

Page 3: CHyM tutorial

What happens if you run a numerical model?

It does not work properly It works properly

Code problem Parameterization problem

Normal co

ndition Very rare event

Page 4: CHyM tutorial

Understand what happens running it as it isWhat happens if you change a single parameterModify 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 neededbefore to use of modify it.

Page 5: CHyM tutorial

tar –xvf /afs/ictp/public/shared/smr2262/chym.tar.gz

CHyM: install procedures

Create a chym directory with the chym code

Page 6: CHyM tutorial

-> /home/netapp-clima/scratch/museo

What CHyM directory will contain

ncarg -> /home/netapp-clima/scratch/ncarg

bin/

chymlab

If NCAR Graphic package is availableYou may want to use CHyM graphic tools

chymlib.a

chym script

museo

Page 7: CHyM tutorial

What happens if you run CHyM script?

The CHyM fortran code is created using the value of few csh parameters you setThe fortran code is compiled and linked with CHyM libraries to create the executableRun chym executable that use museo db. Delete all the unneeded files

chym.f chym.exe

chymlib.a

ncarglib

compilation run chymOutput

museofiles

Page 8: CHyM tutorial

Run CHyM script and understand what is happening(1)

Page 9: CHyM tutorial

Run CHyM script and understand what is happening(2)

Page 10: CHyM tutorial

Run CHyM script and understand what is happening(3)

Page 11: CHyM tutorial

Run CHyM script and understand what is happening(4)

Page 12: CHyM tutorial

Run CHyM script and understand what is happening(5)

Page 13: CHyM tutorial

Run CHyM script and check if it actually happen...

tar –xvf /afs/ictp/public/shared/smr2262/chym.tar.gz

cd chym

./chym

Page 14: CHyM tutorial

What you need to modify inside CHyM script

Page 15: CHyM tutorial

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

Page 16: CHyM tutorial

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

Page 17: CHyM tutorial

CHyM script parameters (3)CHyM parameters affecting Prec./Temp input

ERA40-ERAInterim

Temperature field from MM5

Temperature field after CA algorithm

Page 18: CHyM tutorial

CHyM script parameters (3)

Page 19: CHyM tutorial

CHyM script parameters (3)

Page 20: CHyM tutorial

CHyM script parameters (4)CHyM parameters affecting Graphic output

Page 21: CHyM tutorial

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

Page 22: CHyM tutorial

What you need to modify inside CHyM script

Page 23: CHyM tutorial

set NLON = 300 # number of longitudes set NLAT = 175 # number of latitudesset SLON = 6.50 # 1st longitude set SLAT = 43.80 # 1st latitude

CHyM: scriptset DIJ = 0.020 # lat-lon resolution set DEMF = 3 # 1 Italy, 2 world, 3 both

NLAT

NLONSLON,SLAT

Page 24: CHyM tutorial

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 applicationA table with the information contained in the header of CHyM output filesA 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…)

Page 25: CHyM tutorial

Where CHyM script parameters are listed? (1)

Page 26: CHyM tutorial

Where CHyM script parameters are listed? (2)

Page 27: CHyM tutorial

Where CHyM script parameters are listed? (3)

Page 28: CHyM tutorial

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

Page 29: CHyM tutorial

CHyMLab utility (2)

If you have not the “current directory” in the path you have to have toInvoke the utility specifying the path, namely:

./chymlab tmp/00123100.chym

Page 30: CHyM tutorial

CHyMLab utility (3)

Page 31: CHyM tutorial

CHyMLab utility (4)

Page 32: CHyM tutorial

CHyMLab utility (5)

Page 33: CHyM tutorial

CHyMLab utility (6)

Page 34: CHyM tutorial

CHyMLab utility (7)

CHyMLab> plot riverbasin 44

Page 35: CHyM tutorial

CHyM code (1)

Page 36: CHyM tutorial

CHyM code (2)

Page 37: CHyM tutorial

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 do2b. Look the CHyM code and understand where to modify2c. Implement the code

Page 38: CHyM tutorial

Modify CHyM code (1)

Array dem inside CHyM code

Your data:LAT LON hsl (m)41.50 30.20 100.5 ….. ….. ….

Calculate i,j100.5

Page 39: CHyM tutorial

Modify CHyM code (2)

Page 40: CHyM tutorial

Modify CHyM code (3)

Page 41: CHyM tutorial

Modify CHyM code (4)