Changes between Version 4 and Version 5 of Documentation/UserGuide/VariableHistory
- Timestamp:
- 2017-02-27T10:59:13+01:00 (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Documentation/UserGuide/VariableHistory
v4 v5 1 1 = How to add a variable to history.nc = 2 2 3 Define the variable in i ntersurf.f90, check whether the correct operators (i.e. ave) and history level i.e. (4) are defined more information on 'histdef' and 'histwrite' can be found on the documentation page of this wiki ( or another HowTo, http://forge.ipsl.jussieu.fr/orchidee/wiki/HowTo/HistoryOperators)3 Define the variable in ioipslctrl.f90, check whether the correct operators (i.e. ave) and history level i.e. (4) are defined more information on 'histdef' and 'histwrite' can be found on the documentation page of this wiki ( or another HowTo, http://forge.ipsl.jussieu.fr/orchidee/wiki/HowTo/HistoryOperators) 4 4 5 The first big question is where to put the histdef. It goes in i ntersurf, but there are five possible places for it. The questions you need to ask yourself are: 1) Is this a stomate or sechiba variable? 2) If it is sechiba, do I want to write it to the high frequency file or just the regular file (only a few variables should, in theory, be written to the HF file)? 3) Is this variable part of the ALMA convention or not (if you're not sure, the answer is probably "no")?5 The first big question is where to put the histdef. It goes in ioipslctrl.f90, but there are five possible places for it. The questions you need to ask yourself are: 1) Is this a stomate or sechiba variable? 2) If it is sechiba, do I want to write it to the high frequency file or just the regular file (only a few variables should, in theory, be written to the HF file)? 3) Is this variable part of the ALMA convention or not (if you're not sure, the answer is probably "no")? 6 6 7 The basic structure of i ntersurffor defining variables is7 The basic structure of ioipslctrl for defining variables is 8 8 9 9 {{{ 10 SUBROUTINE intsurf_history10 SUBROUTINE 11 11 12 12 ! Writing to the main history file, file id hist_id … … 48 48 49 49 {{{ 50 ! total livingbiomass50 ! total fruit biomass 51 51 CALL histdef (hist_id_stom, & 52 52 & TRIM("Fruit_M "), & … … 65 65 66 66 There also seems to be a convention that if you are defining a variable for ALMA output, the first letter is a capital letter, and otherwise it is lowercase. I do not know this for a fact, but it seems to be that way in the code. 67 68 If despite your best efforts you get error messages (i.e., define the variable XXX) it may be worth to check the length of your variable name in histdef. There is a maximal length. If that length is exceeded, the string will get truncated and so the field that you think that does exist e.g. VERYLONGVARIABLENAME is in the model known as e.g. VERYLONGVARI. 69 70 Note that IOIPSL routines (histdef, histwrite, getin, ...) are case sensitive. That is another classic cause of appearantly illogic problems.