CFA error on Jasmin

Hi,

I am getting the same error as this ticket Cfa error in reading pp files in jasmin-sci but following the solution is not working. I am using the path export PATH=/home/users/ajh/miniconda3_cfview/bin:$PATH and module load jaspy and have been trying to use cfa -o ll.nc /filepath/*.pp to convert the pp files to netcdf but I get the error:
‘NoneType’ object is not subscriptable
I’m not sure how best to fix this so any ideas would be really helpful.

Thanks,
Hannah

I have also tried using a file to test this with:
import cf
f=‘/home/users/s2261584/MACAQUE/hannah/u-cp624/19900101T0000Z/cp624a.pm1990jan.pp’
indata3=cf.read(f, select=‘stash_code=34070’)
print(indata3)
cf.write(indata3,‘/home/users/s2261584/MACAQUE/hannah/u-cp624/19900101T0000Z/newfiletest.nc’, fmt=‘NETCDF4’)
This works on ARCHER2 (although the time axis disappears) but on JASMIN I still get the NoneType error
Thanks,
Hannah

Hi Hannah,

I cannot see that file as your home directory permissions are too restrictive. Could you do:
chmod 755 ~
So I can see the file?
Cheers
Andy

Hi Andy,
I was working in the folder /MACAQUE/hannah/u-cp624/19900101T0000Z - are you able to access this?
I have also copied the file (cftest.py) and the pp file to my home folder and changed the restrictions as I get the same error using cf and cfa here also.
Thanks,
Hannah

Hi Hannah,

Shifting versions of Python packages is difficult to manage. Try:
source /home/users/ajh/cfview_install/bin/cfview_setup.sh
and see if that version of cf-python (3.13.0) is better as that looks okay to me.

Cheers
Andy

Hi Andy,

Thank you that worked! Only issue now is that the time dimension seems to disappear when it runs? The screenshot below is the netcdf file created and the previous dimensions were 192,144,85,1 for the H2 MASS MIXING RATIO AFTER TIMESTEP. Is there documentation on cf for JASMIN anywhere?

Ideally I would pull out each monthly mean and cdo mergetime them together but this doesn’t work when there is no time dimension.

Thanks,
Hannah

Hi Hannah,

The cf-python documentation is at cf python package — Documentation

If you have any further queries please do ask and someone from CMS will pick it up as I am on leave next week.

Cheers
Andy

Hi Andy,

Thanks for the link - does the time dimension usually disappear like this or is this still an error with python? I can’t see anything in the doc that suggests it should go.

Thanks,
Hannah

Hi Hannah,

Please pop the data in a sub directory of your JASMIN home directory and cf-python commands you used in a python file in the same place.

Cheers
Andy

Hi Andy,
I have moved it all into a folder called cftest13102022, following the instructions in the cftesttimedimension.py I have found a way to create a time dimension. I think the final thing that needs changing is the model levels. Currently when I try to merge the files I get this warning
Coordinates variable model_level_number can’t be assigned and so I think the model levels are not converting well. I tried changing the height_at_top_of_model (shown below) but this did not help.


Sorry for all the questions, I haven’t tried doing this with pp files before!

Thanks,
Hannah

Hi Hannah,
I’ll have to defer to David and Sadie on this one as they are the cf-python authors.

Cheers
Andy

Hi Hannah,

Has this issue been resolved yet? If not I’ll see if David or Sadie can help.

Cheers
Andy

Hi Andy,
Not quite yet! I think David is having a look at it. I’m now trying to check the BRSVD(1) value to use this as the top height as I think this may solve the issue but have found that doing this through mule-pumf or uminfo as suggested here 9. Post processing — NCAS Unified Model Introduction gives me multiple entries for one field (when I search for CH4 MASS MIXING RATIO for example, I get 86 different results, each with different BRSVD1 values). Do you know which one should be used or if there is a better way to check this?
Thanks,
Hannah

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.