Difference between revisions of "Solution to UKCA Chemistry and Aerosol Tutorial 3 Task 3.1"

From UKCA
(Created page with " Back to UKCA Chemistry and Aerosol Tutorials [[UKCA Chemistry and Aerosol Tutorial 3#Solution to Task 3.1 | Back to the what is STASH?…")
 
 
(16 intermediate revisions by the same user not shown)
Line 19: Line 19:
 
==Solution==
 
==Solution==
   
===Step 1: Add the new diagnostic to the STASH table===
+
===Add the new diagnostic to the STASH table===
   
 
Go to '''Model Selection → Atmosphere → STASH → STASH. Specification of Diagnostic requirements'''.
 
Go to '''Model Selection → Atmosphere → STASH → STASH. Specification of Diagnostic requirements'''.
Line 25: Line 25:
 
You will need to add the following to the STASH table
 
You will need to add the following to the STASH table
   
34 1 O3 MASS MIXING RATIO AFTER TIMESTEP T6H DALLTH UPH Y + Y
+
34 1 O3 MASS MIXING RATIO AFTER TIMESTEP T6H DALLTH UPB Y + Y
   
 
i.e.
 
i.e.
Line 35: Line 35:
 
* '''Usage Profile''' = UPB
 
* '''Usage Profile''' = UPB
   
====Verify the Diagnostics====
+
===Verify the Diagnostics===
   
 
Verifing the diagnostics (either ''Control-v'' or ''Diagnostics → Verify Diagnostics'') gives
 
Verifing the diagnostics (either ''Control-v'' or ''Diagnostics → Verify Diagnostics'') gives
Line 46: Line 46:
 
Estimated number of PP files to be written:
 
Estimated number of PP files to be written:
 
 
10200 fields in stream 61. Maximum allowed is 4096.
+
30600 fields in stream 61. Maximum allowed is 4096.
 
22835 fields in Climate mean Period_1
 
22835 fields in Climate mean Period_1
 
22835 fields in Climate mean Period_2
 
22835 fields in Climate mean Period_2
Line 56: Line 56:
 
You don't need to worry about the Climate Mean Period here, and in fact this job will run perfectly happily with this many fields. The line that is of more concern is
 
You don't need to worry about the Climate Mean Period here, and in fact this job will run perfectly happily with this many fields. The line that is of more concern is
   
10200 fields in stream 61. Maximum allowed is 4096.
+
30600 fields in stream 61. Maximum allowed is 4096.
   
The value of 10200 comes from the fact that you are requesting 4x85 level variables for 30 days: 4x30x85=10200.
+
The value of 30600 comes from the fact that you are requesting 4x85 level variables for 90 days: 4x90x85=30600.
   
====Fix====
+
===Fix===
   
 
There are two ways to fix this. They both need you to go to '''Model Selection → Post Processing → Initialization and processing of mean and standard PP files'''.
 
There are two ways to fix this. They both need you to go to '''Model Selection → Post Processing → Initialization and processing of mean and standard PP files'''.
   
=====Method 1: Increase the Override size=====
+
====Method 1: Increase the Override size====
   
 
Increasing the value in the '''Override size''' column from 0 to 16000 for the '''PP1/PB/61''' stream will remove this error. However, the '''Help''' text explicitly states here
 
Increasing the value in the '''Override size''' column from 0 to 16000 for the '''PP1/PB/61''' stream will remove this error. However, the '''Help''' text explicitly states here
   
 
<blockquote>
 
<blockquote>
Override size.
+
Override size.<br/>
 
Fieldsfiles usually can only contain 4096 fields.
 
Fieldsfiles usually can only contain 4096 fields.
 
The recommended way to work around this restriction is to use periodic
 
The recommended way to work around this restriction is to use periodic
Line 82: Line 82:
 
So the UMUI is explicitly suggesting that the frequency of output should be altered. This is Method 2.
 
So the UMUI is explicitly suggesting that the frequency of output should be altered. This is Method 2.
   
=====Method 2=====
+
====Method 2: Change the output frequency====
   
In this method we change the '''Period''' from 30 to 1, i.e. there will be a new file created every day.
+
In this method we change the '''Period''' from 90 to 1, i.e. there will be a new file created every day.
   
 
We will use ''Method 2''.
 
We will use ''Method 2''.
Line 90: Line 90:
 
==Output==
 
==Output==
   
Now save, process, and submit your job. When the job has run the output in your archive directory will now contain two files:
+
Now save, process, and submit your job. When the job has run the output in your archive directory will now contain 4 output files (*.p*):
   
$ ls
+
$ ls *.p*
  +
xjllba.pa20051201 xjllba.pb20051201
xipfba.pb19930901.pp xipfba.ph19930901.pp
 
   
Open the '''ph''' file. The variable list should look like
+
Open the '''pb''' file. The variable list should look like
   
 
0 : 192 145 85 4 Stash code = 34001
 
0 : 192 145 85 4 Stash code = 34001
Line 101: Line 101:
 
Select this field and click the '''t''' radio button, which will list the times of each point in the field. This should give
 
Select this field and click the '''t''' radio button, which will list the times of each point in the field. This should give
   
1993/09/01:06.00 / 720.250000
+
2005/12/01:06.00 / 0.250000
1993/09/01:12.00 / 720.500000
+
2005/12/01:12.00 / 0.500000
1993/09/01:18.00 / 720.750000
+
2005/12/01:18.00 / 0.750000
1993/09/02:00.00 / 721.000000
+
2005/12/02:00.00 / 1.000000
   
 
'''Sample output''' from this job can be found in
 
'''Sample output''' from this job can be found in
   
/work/n02/n02/ukca/Tutorial/sample_output/Task3.1/
+
/work/n02/n02/ukca/Tutorial/vn8.4/sample_output/Task3.1/
   
on HECToR, and in
+
on ARCHER, and in
   
/projects/ukca/Tutorial/sample_ouput/Task3.1/
+
<strike>/projects/ukca/Tutorial/vn8.4/sample_ouput/Task3.1/</strike>
   
 
on MONSooN.
 
on MONSooN.

Latest revision as of 15:05, 15 December 2015

Back to UKCA Chemistry and Aerosol Tutorials

Back to the what is STASH? tutorial

Task

You were asked to

Output the instantaneous UKCA ozone field to the pb/UPB stream every 6 hours.

and were given the hint

You will need to make the changes to the STASH table first, and remember to use Verify Diagnostics and correct any warnings generated for the pb/UPB stream (61).

Solution

Add the new diagnostic to the STASH table

Go to Model Selection → Atmosphere → STASH → STASH. Specification of Diagnostic requirements.

You will need to add the following to the STASH table

34   1 O3 MASS MIXING RATIO AFTER TIMESTEP T6H      DALLTH   UPB      Y +  Y  

i.e.

  • STASH section = 34
  • STASH item = 1
  • Time Profile = T6H
  • Domain Profile = DALLTH
  • Usage Profile = UPB

Verify the Diagnostics

Verifing the diagnostics (either Control-v or Diagnostics → Verify Diagnostics) gives

PP-Field Count Estimates 


Warning!!! You may exceed the maximum number of PP fields per file
	      
Estimated number of PP files to be written:

30600 fields in stream 61.  Maximum allowed is 4096.
22835 fields in Climate mean Period_1
22835 fields in Climate mean Period_2
22835 fields in Climate mean Period_3
22835 fields in Climate mean Period_4

Maximum allowed is 4096 fields per Climate Mean Period.

You don't need to worry about the Climate Mean Period here, and in fact this job will run perfectly happily with this many fields. The line that is of more concern is

30600 fields in stream 61.  Maximum allowed is 4096.

The value of 30600 comes from the fact that you are requesting 4x85 level variables for 90 days: 4x90x85=30600.

Fix

There are two ways to fix this. They both need you to go to Model Selection → Post Processing → Initialization and processing of mean and standard PP files.

Method 1: Increase the Override size

Increasing the value in the Override size column from 0 to 16000 for the PP1/PB/61 stream will remove this error. However, the Help text explicitly states here

Override size.
Fieldsfiles usually can only contain 4096 fields. The recommended way to work around this restriction is to use periodic re-initialisation of the fieldsfiles. In the rare case that this is not a suitable option (e.g. for analysis time in a forecast) it is possible to extend the 4096 field restriction by overriding the default size. Be careful not to override the size by too much - large numbers of fieldsfile headers can be inefficient for both runtime and memory use and may cause problems with some small executables.

So the UMUI is explicitly suggesting that the frequency of output should be altered. This is Method 2.

Method 2: Change the output frequency

In this method we change the Period from 90 to 1, i.e. there will be a new file created every day.

We will use Method 2.

Output

Now save, process, and submit your job. When the job has run the output in your archive directory will now contain 4 output files (*.p*):

$ ls *.p*
xjllba.pa20051201  xjllba.pb20051201  

Open the pb file. The variable list should look like

0    : 192   145   85    4     Stash code = 34001

Select this field and click the t radio button, which will list the times of each point in the field. This should give

2005/12/01:06.00 / 0.250000
2005/12/01:12.00 / 0.500000
2005/12/01:18.00 / 0.750000
2005/12/02:00.00 / 1.000000

Sample output from this job can be found in

/work/n02/n02/ukca/Tutorial/vn8.4/sample_output/Task3.1/

on ARCHER, and in

/projects/ukca/Tutorial/vn8.4/sample_ouput/Task3.1/

on MONSooN.

Worked Solution

There is a worked solution to this problem in the UMUI Tutorial experiment. This is job b: Tutorial: solution to Task 3.1 - outputting a diagnostic.


Written by Luke Abraham 2014