noaa-ocs-modeling / PaHM

Parametric Hurricane Modeling System
Creative Commons Zero v1.0 Universal
5 stars 6 forks source link

Help Mojy to run PaHM with SCHISM #10

Closed saeed-moghimi-noaa closed 2 years ago

saeed-moghimi-noaa commented 2 years ago

@SorooshMani-NOAA @pvelissariou1 How to make sure track file is ok?

saeed-moghimi-noaa commented 2 years ago

@mojy3995 @SorooshMani-NOAA @pvelissariou1 We need to make sure the track files are in NHC bdeck text format (based on what @pvelissariou1 and @SorooshMani-NOAA mentioned). -Saeed

mojy3995 commented 2 years ago

@saeed-moghimi-noaa @SorooshMani-NOAA @pvelissariou1, There is a possibility of failing pyschism to create the correct ".dat" file. Soroosh can test first with the parawind/hurricane-track.dat file (already was created by using pyschism), and if it didn't work, you can re-create that by using parametric_runs/test_paramwind.py to make sure the pyschism/python code is working correctly. I also added the original text file from Sergey. I don't have any other example to check the NHC bdeck text format, but if you have, you can compare with what we have to see if there is something wrong with the original file.

pvelissariou1 commented 2 years ago

The problem is with the formatting of hurricane-track.dat. It is the format used for longitude (column 8) in the data file. PaHM expects 3 digits for longitude that is, 124E instead of 1243E for example. I am using the format of b-deck files supplied by NHC. In PaHM code, I read the longitude field with the format: i3, a1; 3 digits for longitude and a character for the West/East part. I'll check again the b-deck file format and see if I can be more general in reading the fields.

SorooshMani-NOAA commented 2 years ago

@pvelissariou1 can you please test the original track file as well? I just want to make sure it's not the PySCHISM that's reformatting it.

mojy3995 commented 2 years ago

@pvelissariou1, Thank you!! or we can change the .py code to create the readable .dat file for PAHM.

pvelissariou1 commented 2 years ago

Hold on, let me check the documentation to see if I have the correct format.

saeed-moghimi-noaa commented 2 years ago

Mojy, Is this the file Sergey shared that works with ADCIRC as an input file or still need to go through ASWIP (a prep process by adcirc modeling tools)?

Takis, The final format input to ADCIRC and SCHISM are identical, right?

Thanks, -Saeed


Saeed Moghimi, PhD NOS Storm Surge Modeling https://nauticalcharts.noaa.gov/learn/storm-surge-modeling.html Team Lead Coastal Marine Modeling Branch, Coast Survey Development Laboratory, Office of Coast Survey at NOAA National Ocean Service. Address: 1315 East West Hwy, Room 6607, Silver Spring, Maryland 20910

Phone: ‪(302) 827-3986

The contents of this message are mine personally and do not necessarily reflect any position of NOAA.

On Thu, Sep 8, 2022 at 11:49 AM Panagiotis Velissariou < @.***> wrote:

Hold on, let me check the documentation to see if I have the correct format.

— Reply to this email directly, view it on GitHub https://github.com/noaa-ocs-modeling/PaHM/issues/10#issuecomment-1240901099, or unsubscribe https://github.com/notifications/unsubscribe-auth/APZULD4EYBHJLFMNJD2G62LV5IDFZANCNFSM6AAAAAAQH2LNBI . You are receiving this because you were mentioned.Message ID: @.***>

pvelissariou1 commented 2 years ago

Yes, the final format input is identical. Still checking.

pvelissariou1 commented 2 years ago

I have modified the PaHM source code and fixed the issue. It had to do with the read format in the code. I'll update PaHM and I'll create a PR to SCHISM.

mojy3995 commented 2 years ago

This the files that shared by Sergey. I don't know these are before or after the processing. But I think pyschism code reorganize that in a way that PAHM can read that file.

SorooshMani-NOAA commented 2 years ago

PySCHISM doesn't really do any transformation on the format. It pretty much writes out what it reads for most fields. It just adds empty fields for missing segments of the track. It was written very similar to adcircpy's version of it. In this case that 1243E field is read as string and is not reformatted at all.

mojy3995 commented 2 years ago

@SorooshMani-NOAA, thank you Soroosh for the clarification.

pvelissariou1 commented 2 years ago

I updated PaHM repo and created a PR to SCHISM repo. Joseph is to review and accept the PR. Mojgan, when Joseph merges the PR, please update your SCHISM sources. Go into your SCHISM folder and run the command: git pull

mojy3995 commented 2 years ago

Sure. Thank you. Please let me know once he accepts the PR and merges that.

pvelissariou1 commented 2 years ago

Mojgan, please refresh your schism sources and re-run your test case. Joseph has merged my PR to schism. When you are successful with your test case I'll close this issue.

mojy3995 commented 2 years ago

Ok, thanks.

mojy3995 commented 2 years ago

I did git pull and got the latest version. I got this error when I compiled:

/lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(135): error #6417: Th e dimensions of this array have been defined more than once. [BESTTRACKDATA] TYPE(BestTrackData_T), ALLOCATABLE :: bestTrackData(:) -------------------------------------------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(245): error #6158: Th e structure-name is invalid or is missing. [BESTTRACKDATA] bestTrackData(iFile)%fileName = TRIM(ADJUSTL(inpFile)) ------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(245): error #6303: Th e assignment operation or the binary expression operation is invalid for the data types of the two operands. [TRIM] bestTrackData(iFile)%fileName = TRIM(ADJUSTL(inpFile)) ---------------------------------------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(246): error #6158: Th e structure-name is invalid or is missing. [BESTTRACKDATA] bestTrackData(iFile)%thisStorm = "" ------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(247): error #6158: Th e structure-name is invalid or is missing. [BESTTRACKDATA] bestTrackData(iFile)%loaded = .FALSE. ------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(247): error #6303: Th e assignment operation or the binary expression operation is invalid for the data types of the two operands. bestTrackData(iFile)%loaded = .FALSE. ---------------------------------------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(248): error #6158: Th e structure-name is invalid or is missing. [BESTTRACKDATA] bestTrackData(iFile)%numRec = -1 ------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(270): error #6158: Th e structure-name is invalid or is missing. [BESTTRACKDATA] bestTrackData(iFile)%basin(iCnt) ---------------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(270): error #6358: Co nstants and expressions are invalid in read-only I/O lists. bestTrackData(iFile)%basin(iCnt) ---------------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(272): error #6158: Th e structure-name is invalid or is missing. [BESTTRACKDATA] bestTrackData(iFile)%cyNum(iCnt) = IntValStr(TRIM(ADJUSTL(sval2D(iCnt, 2)))) ----------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(276): error #6158: Th e structure-name is invalid or is missing. [BESTTRACKDATA] bestTrackData(iFile)%dtg(iCnt) ---------------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(296): error #6158: Th e structure-name is invalid or is missing. [BESTTRACKDATA] bestTrackData(iFile)%intMslp(iCnt) = IntValStr(TRIM(ADJUSTL(sval2D(iCnt, 10)))) ----------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(298): error #6158: Th e structure-name is invalid or is missing. [BESTTRACKDATA] WRITE(bestTrackData(iFile)%ty(iCnt), '(a2)') TRIM(ADJUSTL(sval2D(iCnt, 11))) ----------------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(300): error #6158: Th e structure-name is invalid or is missing. [BESTTRACKDATA] bestTrackData(iFile)%rad(iCnt) = IntValStr(TRIM(ADJUSTL(sval2D(iCnt, 12)))) ----------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(302): error #6158: Th e structure-name is invalid or is missing. [BESTTRACKDATA] WRITE(bestTrackData(iFile)%windCode(iCnt), '(a3)') TRIM(ADJUSTL(sval2D(iCnt, 13))) ----------------^ /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F90(304): error #6158: Th e structure-name is invalid or is missing. [BESTTRACKDATA] bestTrackData(iFile)%intRad1(iCnt) = IntValStr(TRIM(ADJUSTL(sval2D(iCnt, 14)))) ----------^ /tmp/ifortMqMknU.i90(1584): catastrophic error: Too many errors, exiting compilation aborted for /lfs4/NOS/vdatum/Mojgan.Rostaminia/schism-PAHM/src/Core/PaHM/parwind.F 90 (code 1) make[3]: [Core/CMakeFiles/core.dir/PaHM/parwind.F90.o] Error 1 make[2]: [Core/CMakeFiles/core.dir/all] Error 2 make[1]: [Driver/CMakeFiles/pschism.dir/rule] Error 2 make: [pschism] Error 2

pvelissariou1 commented 2 years ago

Mojgan, open file schism/src/Core/PaHM/parwind.F90 and delete lines 134 and 135: ! Array of info about the best track data (extension to use multiple storms) TYPE(BestTrackData_T), ALLOCATABLE :: bestTrackData(:) When I copied my changes, I left this extra statement by mistake. Please re-compile

mojy3995 commented 2 years ago

ok, it was compiled and it's running!!!!

pvelissariou1 commented 2 years ago

Ok, thanks. I will close this issue.

mojy3995 commented 2 years ago

Are you going to fix that issue or I should document that?

pvelissariou1 commented 2 years ago

I created another PR to SCHISM. Issue is fixed. No need to do anything.

Panagiotis Velissariou, Ph.D., P.E. UCAR Scientist National Ocean and Atmospheric Administration National Ocean Service Office of Coast Survey CSDL/CMMB Project Lead - Coastal Coupling cell: (205) 227-9141 email: @.***

On Thu, Sep 8, 2022 at 2:43 PM Mojy @.***> wrote:

Are you going to fix that issue or I should document that?

— Reply to this email directly, view it on GitHub https://github.com/noaa-ocs-modeling/PaHM/issues/10#issuecomment-1241155029, or unsubscribe https://github.com/notifications/unsubscribe-auth/APC7TPZJBLK7QP2YPPUFMUTV5I6VDANCNFSM6AAAAAAQH2LNBI . You are receiving this because you modified the open/close state.Message ID: @.***>

mojy3995 commented 2 years ago

@pvelissariou1 @SorooshMani-NOAA @saeed-moghimi-noaa I am just checking the results and I am not sure about the accuracy of that. This is maximum elevation: 6.551453e-06 & maximum horizontalVelX= 0.0001021061