[Science] [BAS home] [Met home] [WMC home] | Antarctic Meteorology |
extra | A note on sea ice thickness
Having said that, I regularly use the ancil utilities here to create ancil files, and you can too if you are careful.
Note: if things go horribly wrong, consider carefully the byteorder and machine type you are running this on. Big and Little Endian-ness and so on. I've got best results from Alphas or opterons. More on this here.
Note: some of the examples used here assume that you know something of IDL and the UKMO PP-format. If the latter is false, you're in trouble, because you'll need to create PP-fields in order to convert them... If the former is false, just "blip" over those bits: IDL is similar to fortran in many ways.
You want (well, perhaps you don't, but you can use, if you're cautious) the script
This is perl; it should work on all sane machines. If you don't know perl, you should: now is a good time to learn... Note that wconv.pl changes sometimes: a partial cvs list is: wconv.pl,vTo convert a file from ancil to pp, try:
wconv.pl qrclim.sst qrclim.sst.pp > wconv-sst.out
In this case, I've used the standard SST monthly fields that go into annually repeating runs. This is "easy". Then we can look at the SST fields, e.g.:
wmc> pp_list,'qrclim.sst.pp' ,/nat 24 16 129 8888 0 1 16 96 73 0 0.0000 [ 2.71e+02, 3.03e+02], 2381 24 16 129 8888 0 2 16 96 73 0 0.0000 [ 2.71e+02, 3.03e+02], 2381 24 16 129 8888 0 3 16 96 73 0 0.0000 [ 2.71e+02, 3.03e+02], 2381 24 16 129 8888 0 4 16 96 73 0 0.0000 [ 2.71e+02, 3.03e+02], 2381 24 16 129 8888 0 5 16 96 73 0 0.0000 [ 2.71e+02, 3.03e+02], 2381 24 16 129 8888 0 6 16 96 73 0 0.0000 [ 2.71e+02, 3.04e+02], 2381 24 16 129 8888 0 7 16 96 73 0 0.0000 [ 2.71e+02, 3.05e+02], 2381 24 16 129 8888 0 8 16 96 73 0 0.0000 [ 2.71e+02, 3.06e+02], 2381 24 16 129 8888 0 9 16 96 73 0 0.0000 [ 2.71e+02, 3.05e+02], 2381 24 16 129 8888 0 10 16 96 73 0 0.0000 [ 2.71e+02, 3.04e+02], 2381 24 16 129 8888 0 11 16 96 73 0 0.0000 [ 2.71e+02, 3.03e+02], 2381 24 16 129 8888 0 12 16 96 73 0 0.0000 [ 2.71e+02, 3.03e+02], 2381 wmc> a=get_field('qrclim.sst.pp',/nat,nf=12) wmc> print,pp_guess_title(a) lbexp: 0!CSurface surface temperature after timestep!Cday: 0000 lbexp: 0!CSurface surface temperature after timestep!Cday: 0000 lbexp: 0!CSurface surface temperature after timestep!Cday: 0000 lbexp: 0!CSurface surface temperature after timestep!Cday: 0000 lbexp: 0!CSurface surface temperature after timestep!Cday: 0000 lbexp: 0!CSurface surface temperature after timestep!Cday: 0000 lbexp: 0!CSurface surface temperature after timestep!Cday: 0000 lbexp: 0!CSurface surface temperature after timestep!Cday: 0000 lbexp: 0!CSurface surface temperature after timestep!Cday: 0000 lbexp: 0!CSurface surface temperature after timestep!Cday: 0000 lbexp: 0!CSurface surface temperature after timestep!Cday: 0000 lbexp: 0!CSurface surface temperature after timestep!Cday: 0000 wmc> print,pp_range(a) 271.350 302.649 271.350 302.639 271.350 302.695 271.350 303.091 271.350 303.020 271.350 304.361 271.350 305.028 271.350 305.857 271.350 305.275 271.350 304.137 271.350 302.646 271.350 302.923And all seems plausible. Lets plot one, the first and last one:
pp_plot,a[0],ster=0,la=90,/blo,lev=indgen(30)-2 gettwogifs,out='test-sst-1' pp_plot,a[11],ster=0,la=90,/blo,lev=indgen(30)-2 gettwogifs,out='test-sst-12'
They look OK. Good. Now onto the harder (and more useful) bit...
Here is an example that makes a waterfix ancil for the ocean: glen.pro.
Also, I can't make ancil fields from scratch: these scripts overwrite the contents of existing ancil files, which is much easier. It is possible (and tested to work) to overwrite an annually-repeating sst field with annually-varying values. It may in theory be possible to make, say, a soil moisture ancil by overwriting and sst ancil but I really don't recommend trying that unless you're desperate.
The scripts are:
Lets make some fields to convert:
wmc> y=yc(a,/arr) wmc> for i=0,11 do a[i].data=a[i].data+sind(y) wmc> pp_write,a,'~/public/wmc/misc/ancil/qrclim-sst-1',/natIf all has gone well, these are the same as before plus a dependence on latitude.
Lets convert them to ancil (note that wunconv needs *3* files: an example header file for it to use as a skeleton; the pp-files you want inserted; and the output file):
wunconv.pl qrclim.sst qrclim-sst-1.pp qrclim.sst.1 > wunconv-sst.outOK, fine. That seemed to go ok. But (other than running the model on the file) its hard to tell. So, lets re-convert:
wconv.pl qrclim.sst.1 qrclim-sst-1-reconv.ppNow we read it into IDL:
wmc> b=get_field('~/public/wmc/misc/ancil/qrclim-sst-1-reconv.pp',/nat,nf=12) wmc> a=get_field('~/public/wmc/misc/ancil/qrclim.sst.pp',/nat,nf=12) wmc> pp_plot,pp_diff(a[11],b[11]),la=90,ster=0,lev=indgen(21)/10.-1,/blo
This seems to be OK:
If you find you need wunconv2.pl, then the following example might help (thanks Tom):
wunconv2.pl N_ins=120 DATE=1957 ENDDATE=1989 FIXHD10=1 ancil_file pp_file output_ancil_filewhere
> You will need to add the following lines to the namelist > HEADERS under the line FIXHD(12)=404, > > FIXHD(21)=1996, > FIXHD(22)=12, > FIXHD(23)=1, > FIXHD(28)=1996, > FIXHD(29)=12, > FIXHD(30)=1, > > a perl script to do the editing can be found: cs.pl. The model can then be submitted and it may work!
Past last modified: 27/6/2005 |
wmc@bas.ac.uk © Copyright Natural Environment Research Council - British Antarctic Survey 2001 |