Regarding HYCOM Simulation Error

140 views
Skip to first unread message

zhong minglei

unread,
Apr 1, 2025, 4:56:07 AM4/1/25
to fo...@hycom.org
Dear Alan,
I hope this email finds you well. I am writing to seek your assistance with an error I encountered while running my ocean model simulation. I believe your expertise would be invaluable in helping me resolve this issue.
I am experiencing the following error during model initialization:
relaxation fields for month  3 written into slot  4 now initializing baro nesting fields ... rdbaro_in: nest/archv.0001_018_00 (     2.00000) umix     error in rdbaro_in - expected u_btrop
The error occurs when the model attempts to read barotropic nesting fields from the archive file. Specifically, it seems that the "u_btrop" field (barotropic velocity component) is either missing or cannot be properly accessed in the archive file.
I have attached my archive file (archv.0001_018_00) for your examination. Thank you very much for your time and assistance.

archv.0001_018_00.7z

Alan Wallcraft

unread,
Apr 1, 2025, 6:19:22 AM4/1/25
to HYCOM.org Forum, zhong minglei
Are you sure that this is nest/archv.0001_018_00.[ab]?

I ask because your error message indicates HYCOM read the umix field, but there is no umix in the archive you sent:

field       time step  model day  k  dens        min              max
montg1   =        864      2.000  6 34.000   0.0000000E+00   0.0000000E+00
srfhgt   =        864      2.000  0  0.000   0.0000000E+00   0.0000000E+00
oneta    =        864      2.000  0  0.000   1.0000000E+00   1.0000000E+00
surflx   =        864      2.000  0  0.000   0.0000000E+00   0.0000000E+00
wtrflx   =        864      2.000  0  0.000   0.0000000E+00   0.0000000E+00
salflx   =        864      2.000  0  0.000   0.0000000E+00   0.0000000E+00
bl_dpth  =        864      2.000  0  0.000   8.8254000E+04   1.8827520E+05
mix_dpth =        864      2.000  0  0.000   8.8254000E+04   1.8827520E+05
u_btrop  =        864      2.000  0  0.000   0.0000000E+00   0.0000000E+00
v_btrop  =        864      2.000  0  0.000   0.0000000E+00   0.0000000E+00

If this is the right file, un-comment the print statement in rd_archive (forfun.F90):

      subroutine rd_archive(field, cfield,layer, iunit)

!     if     (mnproc.eq.1) then
!     write(lp,'(a)') cline
!     endif !1st tile

and post the result.

Alan.

zhong minglei

unread,
Apr 2, 2025, 4:10:04 AM4/2/25
to Alan Wallcraft, HYCOM.org Forum
Dear Alan,
Thank you for answering my previous questions. I greatly appreciate your assistance and would like to provide some clarification regarding the archv files I've sent you.
Initially, I had placed my archv files in the nest directory within my scratch directory. However, after I began running HYCOM, I noticed that two new archv files appeared directly in the scratch directory (not in the nest subdirectory). Interestingly, these newly generated archv files in the scratch directory are larger in size compared to those stored in the nest directory.
In my previous email, I sent you one of these newly generated archv files from the scratch directory. To ensure you have all the necessary information for comparison, I am now sending you this types of archv files:
I hope having both sets of files will help you better understand the situation and provide more targeted assistance.
Thank you again for your time and expertise.


发件人: Alan Wallcraft <alan.wa...@hycom.org>
发送时间: 2025年4月1日 18:19
收件人: HYCOM.org Forum <fo...@hycom.org>
抄送: zhong minglei <zml20...@outlook.com>
主题: Re: Regarding HYCOM Simulation Error
 

zhong minglei

unread,
Apr 2, 2025, 4:15:19 AM4/2/25
to Alan Wallcraft, HYCOM.org Forum
Additionally, I realized that I forgot to include my .b file in my previous email. I have attached the .b file to this message for your review.

发件人: Alan Wallcraft <alan.wa...@hycom.org>
发送时间: 2025年4月1日 18:19
收件人: HYCOM.org Forum <fo...@hycom.org>
抄送: zhong minglei <zml20...@outlook.com>
主题: Re: Regarding HYCOM Simulation Error
 
archv.0001_018_00.b

zhong minglei

unread,
Apr 2, 2025, 4:39:54 AM4/2/25
to Alan Wallcraft, HYCOM.org Forum
Dear Alan,  
As you suggested, I uncommented the print statement in the rd_archive subroutine within forfun.F90 After making this change, recompiling, and running HYCOM again, I obtained the following output:
rdbaro_in: nest/archv.0001_018_00 (     2.00000)
montg1   =         48      2.010  0  0.00  -1.5883605E+00   2.2167938E+00      
srfhgt   =         48      2.990  0  0.00   2.1224473E+00   1.1362527E+01      
umix     =         48      2.500  0  0.00  -5.9543955E-01   7.0963681E-01      

umix    
error in rdbaro_in - expected u_btrop


发件人: Alan Wallcraft <alan.wa...@hycom.org>
发送时间: 2025年4月1日 18:19
收件人: HYCOM.org Forum <fo...@hycom.org>
抄送: zhong minglei <zml20...@outlook.com>
主题: Re: Regarding HYCOM Simulation Error
 

Alan Wallcraft

unread,
Apr 2, 2025, 11:26:17 AM4/2/25
to HYCOM.org Forum, zhong minglei, Alan Wallcraft
I have refactored the reading of nest archives to handle all cases.


I have updated the HYCOM-example expt_01.2/blkdat.input files for this code version.


Also, your nest file is a daily mean archive:

field       time step   mean day  k  dens        min              max          
montg1   =         48      2.010  0  0.00  -1.5883605E+00   2.2167938E+00
srfhgt   =         48      2.990  0  0.00   2.1224473E+00   1.1362527E+01
oneta    =         48      2.500  0  0.00   1.0000360E+00   1.0830837E+00

This should be called archm.0001_018_12.[ab] (archm and _12) with:

  -1.0   'bnstfq' = number of days between baro nesting archive input
  -1.0   'nestfq' = number of days between 3-d  nesting archive input

Alan..

zhong minglei

unread,
Apr 3, 2025, 2:27:27 AM4/3/25
to Alan Wallcraft, HYCOM.org Forum
First and foremost, I would like to express my sincere gratitude for your dedicated efforts and valuable contributions to the HYCOM project. Your work has been instrumental in advancing our research capabilities. 
 However, I am currently working with HYCOM version 2.3.00 and have encountered some difficulties when attempting to modify the forfun.F90 file. Specifically, I downloaded the latest version of the forfun.F90 file and tried to compile it with my HYCOM installation, but unfortunately received compilation errors. 
 Given that I'm using version 2.3.00, could you please provide some guidance on how to properly modify the forfun.F90 file to ensure compatibility? I'm wondering if there are specific adjustments or considerations needed for this particular version that differ from the latest implementation.

发件人: Alan Wallcraft <alan.wa...@hycom.org>
发送时间: 2025年4月2日 23:26
收件人: HYCOM.org Forum <fo...@hycom.org>
抄送: zhong minglei <zml20...@outlook.com>; Alan Wallcraft <alan.wa...@hycom.org>

zhong minglei

unread,
Apr 3, 2025, 2:37:46 AM4/3/25
to Alan Wallcraft, HYCOM.org Forum
Dear Alan, 
I wanted to follow up on my previous message with additional information about the specific errors I encountered. 
 After attempting to implement only your most recent changes (from approximately 10 hours ago) to the forfun.F90 file in my HYCOM 2.3.00 installation, I received the following compilation errors:
mpiifort -DREAL8 -DMPI -DENDIAN_IO -DNAN2003 -DTIMER -DRELO -DEOS_SIG2 -DEOS_17T   -DMASSLESS_1MM -traceback -xHost -O3 -fp-model precise -no-fma -ftz -align array64byte -r8 -warn nogeneral -diag-disable 10212 -mcmodel=small -c dpudpv.F90
mpiifort -DREAL8 -DMPI -DENDIAN_IO -DNAN2003 -DTIMER -DRELO -DEOS_SIG2 -DEOS_17T   -DMASSLESS_1MM -traceback -xHost -O3 -fp-model precise -no-fma -ftz -align array64byte -r8 -warn nogeneral -diag-disable 10212 -mcmodel=small -c forfun.F90
forfun.F90(4336): error #6404: This name does not have a type, and must have an explicit type.   [UN1MIN]
                               un1min(lslot),un1max(lslot), &
-------------------------------^
forfun.F90(4336): error #6404: This name does not have a type, and must have an explicit type.   [UN1MAX]
                               un1min(lslot),un1max(lslot), &
---------------------------------------------^
forfun.F90(4338): error #6410: This name has not been declared as an array or a function.   [UN1MIN]
          un1min(lslot) = un1min(lslot) - 0.1
----------^
forfun.F90(4339): error #6410: This name has not been declared as an array or a function.   [UN1MAX]
          un1max(lslot) = un1max(lslot) + 0.1
----------^
forfun.F90(4342): error #6404: This name does not have a type, and must have an explicit type.   [VN1MIN]
                               vn1min(lslot),vn1max(lslot), &
-------------------------------^
forfun.F90(4342): error #6404: This name does not have a type, and must have an explicit type.   [VN1MAX]
                               vn1min(lslot),vn1max(lslot), &
---------------------------------------------^
forfun.F90(4344): error #6410: This name has not been declared as an array or a function.   [VN1MIN]
          vn1min(lslot) = vn1min(lslot) - 0.1
----------^
forfun.F90(4345): error #6410: This name has not been declared as an array or a function.   [VN1MAX]
          vn1max(lslot) = vn1max(lslot) + 0.1
----------^
forfun.F90(4506): error #6404: This name does not have a type, and must have an explicit type.   [FMIN]
        fmin = hminb
----------^
forfun.F90(4507): error #6404: This name does not have a type, and must have an explicit type.   [FMAX]
      fmax = hmaxb
------^
It seems that these variables may have been declared in newer versions of the code but are missing from my 2.3.00 version. Could you please advise on how I should properly declare these variables in my version of the code? Should I look for their declarations in the latest version of forfun.F90 and add them to my file, or is there a simpler approach to incorporating your recent changes?

发件人: Alan Wallcraft <alan.wa...@hycom.org>
发送时间: 2025年4月2日 23:26
收件人: HYCOM.org Forum <fo...@hycom.org>
抄送: zhong minglei <zml20...@outlook.com>; Alan Wallcraft <alan.wa...@hycom.org>

zhong minglei

unread,
Apr 3, 2025, 4:14:27 AM4/3/25
to Alan Wallcraft, HYCOM.org Forum
Dear Alan, 
I wanted to take a moment to express my sincere gratitude for your prompt and helpful response regarding the HYCOM compilation issues I was experiencing. 
 I have re-downloaded the latest HYCOM source code and am currently working on completing the compilation.
Thank you once again for your support and assistance. I truly appreciate your help.


发件人: Alan Wallcraft <alan.wa...@hycom.org>
发送时间: 2025年4月2日 23:26
收件人: HYCOM.org Forum <fo...@hycom.org>
抄送: zhong minglei <zml20...@outlook.com>; Alan Wallcraft <alan.wa...@hycom.org>

Alan Wallcraft

unread,
Apr 3, 2025, 4:52:10 AM4/3/25
to HYCOM.org Forum, zhong minglei, Alan Wallcraft
When compiling (Make.csh) use the following macros:

setenv OCN_MISC "-DMASSLESS_1MM -DRDNEST_MASK -DLATBDT_NPLINE3"

The last two macros are for nesting with mean archives.

Alan.
Reply all
Reply to author
Forward
0 new messages