-
Notifications
You must be signed in to change notification settings - Fork 4
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
UFS-Coastal Input File Generation Scripts for Workflow #11
Comments
@josephzhang8 , @feiye-vims , @saeed-moghimi-noaa , @SorooshMani-NOAA , As we're integrating PySCHISM functionality into UFS-Coastal and other operational systems, I believe we should discuss the future development and maintenance of PySCHISM. Some discussion points:
Would appreciate your insights on the best path forward for development and operational support. |
@mansurjisan Let me know if scripts are ready to port into workflow. |
Thx @mansurjisan. Currently VIMS team is maintaining pySCHISM, but due to sever manpower shortage we were only able to do bug fixes in the past years or so. Development of new capabilities is out of question. I would appreciate it if other teams can take charge. |
@josephzhang8 I remember we had this discussion about PySCHISM vs PyLibs a while ago. We understand that it's not feasible to maintain two separate packages which do the same thing in the long run, especially given the developer availability; so we wanted to make sure we understand what the plans are for PySCHISM and PyLibs, and if we, for example, need to switch to PyLibs more instead of SCHISM. If I remember correctly, at some point you mentioned VIMS wants to keep PySCHISM for its downloading capabilities, while PyLibs is better for its setup capabilities. We just wanted to double check before either side invest more time and energy (i.e. scripting) on one or the other tool. |
It's not easy to merge the 2 packages due to very different starting points:
I personally use both depending on what tasks I want to accomplish. For model setup using HYCOM, atmos forcing, I use pySCHISM as it's more developed in those areas. I use pyLibs (schismview, schismcheck, pload) to viz inputs/outputs and also load from DEMs and generating b.c. part for hgrid. I'm sure there are other usages for either tool that I have not used. It'd be good to have a meeting involving developers of the two tools. I did that a few years ago and the consensus was that it's premature to discuss merging. pyLibs developer has been reluctant to add HYCOM and atmos capabilities if doing so would mean he has to add dependencies; at the moment pyLibs has a very small core lib that proved to be powerful for what we are doing. Maybe you all have good ideas in this regard. |
Hi @uturuncoglu , the script to generate the boundary condition for SCHISM is ready to be used within UFS-Coastal workflow. The script is located here: https://github.com/mansurjisan/UFS-Coastal-Inputs/blob/main/scripts/coastal_ike_shinnecock_atm2sch/gen_bctides.py Also, i attached a PDF file at the end of this comment: #11 (comment) We can talk about it more during our Monday meeting. |
@mansurjisan Okay. Let me try to use it under workflow. I'll update you soon. |
Thanks @uturuncoglu . I forgot to mention that the script requires to have the TPXO data located in /home/$username/.local/share/tpxo directory. Please give it a try and let me know if any additional changes need to be made. |
I've developed a script to generate meteorological forcing for UFS-Coastal data atmospheric cap using the pySCHISM library. While the script successfully downloads and processes GFS and HRRR data from AWS, I discovered a limitation for historical test cases:
The AWS archive only contains:
Alternative data sources for historical cases:
I plan to extend the script to include ERA5 data download functionality for historical cases in the next update. The current script is available at: Usage examples: # HRRR data
python download_met.py --start-date "2025-01-03 12:00" --rnday 1 --model hrrr --var uwind vwind prmsl --hgrid ../../data/hgrid.gr3
# GFS data
python download_met.py --start-date "2025-01-03 12:00" --rnday 1 --model gfs --var uwind vwind prmsl --hgrid ../../data/hgrid.gr3
# For Grib2 data format
python download_met.py --start-date "2025-01-03 12:00" --rnday 1 --model gfs --format grib2
--var uwind vwind prmsl --hgrid ../../data/hgrid.gr3 |
There is a script for ERA5 under examples/Sflux. It requires users to download a key from ECMWF site. |
Thank you, Joseph! I usually use that script to download ERA5 data and will be incorporating it into the existing meteorological forcing download script for UFS-Coastal data atmosphere input generation purposes. |
@mansurjisan What is the best way to point out the location of TPXO file in |
@mansurjisan Okay.I found it in the pyschsim code.
|
@uturuncoglu , thanks, Ufuk. The bctides script reads the TPXO data from the files located in home directory. My TPXO files are located here in Hercules: Please let me know if you have any questions. |
@mansurjisan Okay. I run entire workflow and compared the results with the baseline (the run without schism related tasks and retrieving files from presaged It seems that ocnImp_So_omask in mediator history is not identical with the baseline run. I also checked the model output and it seems that outputs/schout_000000_1.nc file is also different. I need to investigate little bit more to understand why but it seems that the input files generated by the scripts are not same with the ones found in the RT. I just wonder if you test these scripts to reproduce the results of the existing RT ( |
@mansurjisan I also realized that the RT has no files like |
@mansurjisan Maybe gr3 files are different since we are using fixed values in https://github.com/mansurjisan/UFS-Coastal-Inputs/blob/9b9163f263862a7ea94292dc53cfcd407bc34b6c/scripts/coastal_ike_shinnecock_atm2sch/gen_gr3_input.py#L34 and they might be different from the ones used to create RT files. |
@uturuncoglu , let me take a look at the RT Shinnecock case again. But I can confirm that the bctides file that we use in the RT case and the one I generated using TPXO are not exactly the same. We actually don't have any information on how that bctides file was generated that is in the RT Shinnecock directory. |
@mansurjisan Thanks for your help. That is fine to have difference if we know the issue. I know it is hard to reproduce the exiting case since we have lack of information. I also think that there is no any issue with gr3 files. Anyway, let me finalize the initial version of the workflow and merge with the app. so, you (or anyone else) could also try to run a case. In the mean time, let me know if you find anything. We could also go with another case that we know how the files are generated such as duck (only atm and ocn) case etc. I think that would be more useful since we know how those test ate created. Let me know what you think. |
@uturuncoglu , thank you! Yes, I agree. We better understand the input data sources and generation steps for the Duck, NC test case. Let's talk about it more during our next meeting. I will keep you posted about the Shinnecock test case. |
@mansurjisan Yes, good idea. |
@mansurjisan I have a minor question. Do we need both |
We still need hgrid.ll. I tried to run SCHISM without hgrid.ll file, but the model failed. Also, when nws is set to 2, I think, the model requires hgrid.ll file. |
@mansurjisan what about the gr3 file. Does it also fail if you remove that one? I am not sure what is the main difference between those files. Anyway, thanks for checking. |
@uturuncoglu , I tried to run the model without the |
@mansurjisan Thanks for all the details. It is good to know. |
Original message:
I wonder if it possible to look at bctides.in in coastal_ike_shinnecock_atm2sch_intel and find the correct combination of those parameters that I could test with the workflow. Then, we don’t need to get that file from the RT directory. Anyway, I think this is very good progress and probably I could merge the current development to app soon (I still need to do couple of improvement) and then try with other cases like Duck (btw, if you have a run directory DATM+SCHISM for Duck case let me know - incl. options that I need to use for your scripts and I could give a shot). Thanks for your help. It was not possible without your scripts and help. Update from: @mansurjisan: This is great news! Following up on our previous discussion about I've attempted to generate a new python gen_bctides.py hgrid.ll 2008-08-23 20 I used the TPXO tide database. While the generated |
@mansurjisan Okay. Thanks. Maybe there is no need to have identical results in app level. At least we know the source of the issue in here. The other thing is that if I generate the |
@pvelissariou1 I wonder if you know the source of |
@uturuncoglu Ufuk I'll schedule a quick meeting in a while to explain how it is done. I have my files on hera |
@pvelissariou1 Thanks. JFYI, I'll be out of office in a half hour and get back around 12 MT. |
I sent an invitation, I will rescedule |
@mansurjisan JFYI, We had a meeting with @pvelissariou1 yesterday. The source of the bctides.in is FES2014 dataset but after creating base data, there is an extra step to make it work for specific date. @pvelissariou1 will provide the scripts and information about his workflow and I'll test in my end and eventually make it available under workflow if we could generate the same file. |
@uturuncoglu , @mansurjisan The archive of the files for the generation of |
@uturuncoglu , @mansurjisan the data on hercules now are at: |
@pvelissariou1 , @uturuncoglu , Thank you very much for the updates and for sharing additional files. I will look into the scripts and will update you on Monday. |
@uturuncoglu , @janahaddad
UFS-Coastal Input File Generation Scripts for Workflow
Collection of scripts for generating input files for UFS-Coastal
Repository Link
UFS-Coastal-Inputs on GitHub
This is the continuation of this ticket oceanmodeling/ufs-weather-model#127 (comment)
Script update:
SCHISM Boundary Condition Generator (gen_bctides.py)
I updated SCHISM's boundary condition generation script (gen_bctides.py) to be used
within the UFS-Coastal for Ike Shinnecock and Duck, NC regression test cases.
Workflow diagram:
workflow
Features
Multiple Boundary Types:
Data Sources:
Automated Processing:
Usage
Required Files
Dependencies
schism_bc_in_ufs_coastal.pdf
The text was updated successfully, but these errors were encountered: