I am having trouble getting flex_extract to run properly. In following the online guide, I have successfully been able to install flex_extract to my local computer. However, I have been having trouble executing the command run_local.sh
Here is some information:
-The control file I am testing is CONTROL_EA5
-The script run_local.sh has been modified to the following:
QUEUE=''START_DATE=NoneEND_DATE=NoneDATE_CHUNK=NoneJOB_CHUNK=NoneBASETIME=NoneSTEP=NoneLEVELIST=NoneAREA=NoneINPUTDIR='./Workspace/EA5'OUTPUTDIR=NonePP_ID=NoneJOB_TEMPLATE=''CONTROLFILE='CONTROL_EA5'DEBUG=0REQUEST=0PUBLIC=1After typing $ ./run_local.sh, I get the following:Retrieving ECMWF data!start date 20180809end date 20180809Using ECMWF WebAPI: FalseUsing CDS API: False... removing old files in /usr/local/src/flex_extract/Run/./Workspace/EA5... retrieve 20180808/to/20180810 in dir /usr/local/src/flex_extract/Run/./Workspace/EA5marsclass: EAdataset: Nonetype: FClevtype: SFClevelist: 1repres:date: 20180808/to/20180810resol: 799stream: OPERarea: 74.0/-24.0/9.875/60.375time: 06/18step: 1/to/12/by/1expver: 1number: OFFaccuracy: 24grid: 0.28125/0.28125gaussian:target: /usr/local/src/flex_extract/Run/./Workspace/EA5/FCOG_acc_SL.20180808.3308.3309.grbparam: 142.128/143.128/146.128/180.128/181.128/176.128target: /usr/local/src/flex_extract/Run/./Workspace/EA5/FCOG_acc_SL.20180808.3308.3309.grb/usr/lib/python3.10/subprocess.py:955: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used self.stdin = io.open(p2cwrite, 'wb', bufsize)/usr/lib/python3.10/subprocess.py:961: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used self.stdout = io.open(c2pread, 'rb', bufsize)/usr/lib/python3.10/subprocess.py:966: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used self.stderr = io.open(errread, 'rb', bufsize)MARS request failed File "/usr/local/src/flex_extract/Run/../Source/Python/submit.py", line 268, in <module> main() File "/usr/local/src/flex_extract/Run/../Source/Python/submit.py", line 107, in main get_mars_data(c) File "/usr/local/src/flex_extract/Source/Python/Mods/get_mars_data.py", line 158, in get_mars_data do_retrievement(c, server, start, end, datechunk, fluxes=True) File "/usr/local/src/flex_extract/Source/Python/Mods/get_mars_data.py", line 386, in do_retrievement my_error('MARS request failed') File "/usr/local/src/flex_extract/Source/Python/Mods/tools.py", line 335, in my_error trace = '\n'.join(traceback.format_stack())
I have been struggling to pinpoint what the exact problem is. If you have any thoughts or suggestions, I would greatly appreciate them.
Thank you very much,
Kevin Bloxam
(He/Him)
Postdoctoral Fellow
Department of Physics | Faculty of Arts and Science | University of Toronto
kevin.bloxam@utoronto.ca
Edited
Designs
Child items ...
Show closed items
Linked items 0
Link issues together to show that they're related.
Learn more.
Sorry for the long wait. I'm not really an flex extract expert, but I will try to help you. I'm using flex_extract mainly on ECMWF's servers, that's why im not too familiar with the local installation and retrieval via CDS, but that should work too.
I will try to recreate your issue on my setup and see if that helps.
./run_local.sh Retrieving ECMWF data and printing MARS request!start date 20180809 end date 20180809 ... removing old files in /some/path/flexextract ... retrieve 20180808/to/20180810 in dir /some/path/flexextract marsclass: EA dataset: None type: FC levtype: SFC levelist: 1 repres: date: 20180808/to/20180810 resol: 799 stream: OPER area: 74.0/-24.0/9.875/60.375 time: 06/18 step: 1/to/12/by/1 expver: 1 number: OFF accuracy: 24 grid: 0.28125/0.28125 gaussian: target: /some/path/flexextract/FCOG_acc_SL.20180808.1886661.1886662.grb param: 142.128/143.128/146.128/180.128/181.128/176.128 target: /some/path/flexextract/FCOG_acc_SL.20180808.1886661.1886662.grbMARS request failed File "/some/path/workspace/flex_extract/Run/../Source/Python/submit.py", line 272, in <module> main() File "/some/path/workspace/flex_extract/Run/../Source/Python/submit.py", line 108, in main get_mars_data(c) File "/some/path/workspace/flex_extract/Source/Python/Mods/get_mars_data.py", line 161, in get_mars_data do_retrievement(c, server, start, end, datechunk, fluxes=True) File "/some/path/workspace/flex_extract/Source/Python/Mods/get_mars_data.py", line 393, in do_retrievement my_error('MARS request failed') File "/some/path/workspace/flex_extract/Source/Python/Mods/tools.py", line 344, in my_error trace ='\n'.join(traceback.format_stack())
I think using pip3 install eccodes --no-binary eccodes instead of pip3 install eccodes should fix that. then the version of the library should be 2.35 and not 2.39.2, which causes this error. Rerunning...
Thank you for looking into this. Since submitting this ticket, I have been able to get flex_extract installed. The problem ended up being that I needed to change the shebang hander in the some of the files so that the proper python environment was being loaded. However, I did get those same warnings regarding the binary, so I will try reinstalling it using the $ pip3 install eccodes --no-binary eccodes line of code that you mentioned.
I think using pip3 install eccodes --no-binary eccodes instead of pip3 install eccodes should fix that. then the version of the library should be 2.35 and not 2.39.2, which causes this error. Rerunning...
ll /some/path/flexextract_out/
total 3.7G
-rw-r--r--. 1 user users 156M Jan 29 16:21 EA18080900
-rw-r--r--. 1 user users 156M Jan 29 16:21 EA18080901
-rw-r--r--. 1 user users 156M Jan 29 16:21 EA18080902
-rw-r--r--. 1 user users 156M Jan 29 16:21 EA18080903
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080904
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080905
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080906
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080907
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080908
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080909
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080910
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080911
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080912
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080913
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080914
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080915
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080916
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080917
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080918
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080919
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080920
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080921
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080922
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080923
Then everything works. Thanks for letting me know aout the forum from ecmwf. I will write something there explaining the details.
Sorry for another email. I have some more questions. I have been having some trouble with micromamba (I haven't used it before). After installing micromamba, I tried then line of code you had,
but didn't work. Should "install" instead be set to "create"? In running with create, I don't get any error messages and it appears to be okay.
The next question is, do I then need to activate the environment? I.e.
$ micromamba activate /path/to/pyflexextract
My last question (for now) is after activating (?) the environment, I do
$ pip3 install eccodes --no-binary eccodes
but in doing so it uses version 2.39.2. I checked the other versions available, but I don't see version 2.35 that you mentioned. Is 2.35 the correct version?
ll /some/path/flexextract_out/
total 3.7G
-rw-r--r--. 1 user users 156M Jan 29 16:21 EA18080900
-rw-r--r--. 1 user users 156M Jan 29 16:21 EA18080901
-rw-r--r--. 1 user users 156M Jan 29 16:21 EA18080902
-rw-r--r--. 1 user users 156M Jan 29 16:21 EA18080903
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080904
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080905
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080906
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080907
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080908
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080909
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080910
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080911
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080912
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080913
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080914
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080915
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080916
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080917
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080918
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080919
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080920
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080921
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080922
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080923
Then everything works. Thanks for letting me know aout the forum from ecmwf. I will write something there explaining the details.
Since my last email, I continued to move forward with trying to get flex_extract to work. It seems to be working better, and I have moved past my last problem, however I have encountered the following error message:
...
STOP SUCCESSFULLY FINISHED calc_etadot: CONGRATULATIONS
outputfile = /home/kbloxam/flex_extract/Run/Workspace/EA5/EA18080922
current product: ('20180809', '2300', '0')
STATISTICS: 98424.9895 98324.5547 4445.2783
Note: The following floating-point exceptions are signalling: IEEE_UNDERFLOW_FLAG IEEE_DENORMAL
STOP SUCCESSFULLY FINISHED calc_etadot: CONGRATULATIONS
outputfile = /home/kbloxam/flex_extract/Run/Workspace/EA5/EA18080923
Postprocessing:
Format: GRIB2
Output filelist:
['EA18080900', 'EA18080901', 'EA18080902', 'EA18080903', 'EA18080904', 'EA18080905', 'EA18080906', 'EA18080907', 'EA18080908', 'EA18080909', 'EA18080910', 'EA18080911', 'EA18080912', 'EA18080913', 'EA18080914', 'EA18080915', 'EA18080916', 'EA18080917', 'EA18080918', 'EA18080919', 'EA18080920', 'EA18080921', 'EA18080922', 'EA18080923']
ECCODES ERROR : concept: no match for paramId=142
ECCODES ERROR : concept: input handle edition=2, centre=ecmf
ECCODES ERROR : concept: input handle dataset=era
ECCODES ERROR : Please check the Parameter Database 'https://codes.ecmwf.int/grib/param-db/?id=142'
ECCODES ERROR : grib_set_values[0] edition (type=long) failed: Concept no match (message 824)
ECCODES ERROR : grib_set_values[1] productDefinitionTemplateNumber (type=long) failed: Value is read only (message 824)
... ERROR CODE: 220
... ERROR MESSAGE:
Command '['grib_set', '-s', 'edition=2,productDefinitionTemplateNumber=8', '/home/kbloxam/flex_extract/Run/Workspace/EA5/EA18080900', '/home/kbloxam/flex_extract/Run/Workspace/EA5/EA18080900_2']' returned non-zero exit status 220.
... GRIB2 CONVERSION FAILED!
Sorry for another email. I have some more questions. I have been having some trouble with micromamba (I haven't used it before). After installing micromamba, I tried then line of code you had,
but didn't work. Should "install" instead be set to "create"? In running with create, I don't get any error messages and it appears to be okay.
The next question is, do I then need to activate the environment? I.e.
$ micromamba activate /path/to/pyflexextract
My last question (for now) is after activating (?) the environment, I do
$ pip3 install eccodes --no-binary eccodes
but in doing so it uses version 2.39.2. I checked the other versions available, but I don't see version 2.35 that you mentioned. Is 2.35 the correct version?
ll /some/path/flexextract_out/
total 3.7G
-rw-r--r--. 1 user users 156M Jan 29 16:21 EA18080900
-rw-r--r--. 1 user users 156M Jan 29 16:21 EA18080901
-rw-r--r--. 1 user users 156M Jan 29 16:21 EA18080902
-rw-r--r--. 1 user users 156M Jan 29 16:21 EA18080903
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080904
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080905
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080906
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080907
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080908
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080909
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080910
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080911
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080912
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080913
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080914
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080915
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080916
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080917
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080918
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080919
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080920
-rw-r--r--. 1 user users 156M Jan 29 16:22 EA18080921
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080922
-rw-r--r--. 1 user users 157M Jan 29 16:22 EA18080923
Then everything works. Thanks for letting me know aout the forum from ecmwf. I will write something there explaining the details.