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.
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 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
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.
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?
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.
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.
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