noaa-ocs-modeling/PaHM

Help Mojy to run PaHM with SCHISM

saeed-moghimi-noaa opened this issue · 24 comments

Help Mojy to run PaHM with SCHISM

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

@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

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

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.

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

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

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

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

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.

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.

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.

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

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

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

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.

Ok, thanks.

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

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

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

Ok, thanks. I will close this issue.

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

@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