-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: NCEP/prep_bufr code outdated, fails to compile with gfortran #634
Comments
Including comments from Nancy in our discussion of the prepbufr section of the WRF/DART Tutorial: "" There are several complications here - which a redesign could help:
|
as i mentioned in the standup, years ago (egads, 2013 apparently?) i made a simple pass through the prepbufr.f code to enable additional obs types and add more comments. i found a copy of it and it's in my home directory on derecho if you want to see/use it. i didn't tackle outputting our format obs directly from it but that could be added where it does the ascii write. we'd have to add a quickbuild to pull in our other source code - right now it's a standalone compile. |
Many of the prepqm files are “cosblocked”, which makes it so you can't untar them. On cheyenne there used to be a cosconvert program to fix the file, but this is not on Derecho. The majority of these prepqm files are therefore currently unusable. I followed the instructions here to build the program, but it was missing necessary files. Nancy was able to get the source code over email and build successfully. She is awaiting a response to her question of if we could put the source code some place users could access it. |
Marlee, I've worked quite a bit on these prepbufr files and I used to unblock them routinely. I didn't use any special tool to do that. Below is a sample to unblock a file. You can also refer to one of my obs processing scripts for more details:
|
moha - i think that's a different type of blocking. cword.x works on individual prepqm files that are in bufr format. the tar files that are archived on the RDA can't be untarred into individual prepqm.in files until they're converted with 'cosconvert'. the source says it has something to do with cray blocking. n. |
I get it now. Are we talking about this: |
@mgharamti yes that is it |
There are many issues with the documentation for PROGRAM prepbufr (https://docs.dart.ucar.edu/en/latest/observations/obs_converters/NCEP/prep_bufr/prep_bufr.html). We want to combine this document with the information about prepbufr in the WRF-DART tutorial. We will then remove that section from the tutorial and just have it point to the prepbufr program page so we don't have to maintain two separate docs for this and because it is difficult to follow the instructions and get all the necessary info having to go back and forth between these two documents. We will also need to address several issues with the PROGRAM prepbufr page (DART/observations/obs_converters/NCEP/prep_bufr/prep_bufr.rst), including but not limited to:
|
Marlee, thanks for working on this. It does seem like a mess. I agree regarding updating the documentation. |
over the years i've stuffed things in my home dir for other folks to pick up. it does seem a bit out of control! maybe a house-cleaning is in order... |
i got a note back from bob dattore, who wrote the cosconvert.c source. he says:
there's a copy of the source in my home dir on derecho, so whoever works on the prepbufr code can put a copy where ever seems appropriate without worrying about licensing issues. |
@mjs2369 thanks for working through this. The dart docs point to https://rda.ucar.edu/datasets/ds090.0/ which There are newer versions of the dataset, e.g. Before bashing though cosconvert.c, let's regroup and see what data we should be using. |
i think the question was if we'd point users to the cosconvert source or not. the sentiment is no - that's an RDA problem. so there's nothing to do there. as far as the netcdf format, in observations/obs_converters/NCEP/netcdf is a version of a netcdf to obs converter that was started by soyoung but never finished. the README says some of the needed info was missing at the time the code was written. if the netcdf files now have what is needed, maybe look there to see if it's worth starting from it or from scratch. the main program is 'convert_pb_netcdf' which could be renamed to be clearer but i think stands for 'convert prepbufr netcdf files to obs_seq'. edit: changed what i think the program name stands for. it reads already converted netcdf and outputs obs_seq |
I think a question is also, should we point people to https://rda.ucar.edu/datasets/ds337.0/ rather than https://rda.ucar.edu/datasets/ds090.0/ |
Timeout on this issue. |
Onging work for prepbufr obs conversion is in bug report #634. The WRF-Tutorial will function without full resolution of prepbufr obs conversion for Derecho.
Describe the bug
The code in this directory is very outdated and difficult to use and produces some compile time errors with more recent versions of gfortran. This is not DART code, and has been fragile in the past (similar to the JPL module code). In order to change this code, we need to have extensive tests.
This code is not built with the dart build system (mkmf, quickbuild). Instead, there's two scripts for building, one being bash and the other cshell: DART/observations/obs_converters/NCEP/prep_bufr/install.sh and DART/observations/obs_converters/NCEP/prep_bufr/convert_bufr/convert_bufr.csh.
The following files also include the use of outdated subroutines argc and getarg, which were replaced by the fortran intrinsics everywhere else in the DART code:
observations/obs_converters/NCEP/prep_bufr/convert_bufr/arg_test.f and observations/obs_converters/NCEP/prep_bufr/convert_bufr/stat_test.f:
observations/obs_converters/NCEP/prep_bufr/convert_bufr/arg_test.f
Finally, grabbufr.f fails to compile with gfortran 12.2.0 due to type mismatch errors (see screenshot). It does compile with intel.
Run "./install.sh" and then "./convert_bufr/convert_bufr.csh" using gfortran. To do so, you must edit convert_bufr.csh to set gfortran as the Fortran compiler.
Three executables are produced: stat_test.x, arg_test.x, and grabbufr.x
Grabbufr.f fails to compile with multiple errors
Error Message
See screenshot
Which model(s) are you working with?
NCEP observation converter
Screenshots
Version of DART
v11.0.2
Have you modified the DART code?
No
Build information
Please describe:
All machines, gfortran 12.2.0
The text was updated successfully, but these errors were encountered: