Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Coupler doesn't read NCAR restart files.

It produces very strange error:

PGFIO/stdio: No such file or directory
PGFIO-F-/unformatted read/unit=10/error code returned by host stdio - 2.
File name = b30.031.cpl6.r.0821-01-01-00000 unformatted, sequential access record = 2
In source file /home/veremeev/ccsm3_0/models/csm_share/cpl/cpl_iobin_mod.F90, at line number 233

The coupler log contains (last lines)
(main) -------------------------------------------------------------------------
(main) get simulation start date
(main) -------------------------------------------------------------------------
(restart_readDate) restart type = branch => restart file specified by namelist variable
(restart_readDate) reading start date from restart file: b30.031.cpl6.r.0821-01-01-00000


However, the file exists, and the first record from it was read.
'write' statement, put on the line, next to 233 of the file ccsm3_0/models/csm_share/cpl/cpl_iobin_mod.F90 confirms this.

The file is situated on the local filesystem, not NFS in the current working directory. This is confirmed with the getcwd subroutine.
I am its owner, it has rw-r--r-- attributes.

At the same time, restart files, created locally on this computer, are successfully read, and the model runs and doesn't produce errors.

I also tried the 'inquire' statement to get all possible file information.
The file exists, is opened, and is unformatted.

I also tried the to restart from the day 0881-01-01
The result is the same error.

My system configurations is listed here
http://bb.cgd.ucar.edu/showthread.php?t=320

After the compiler upgrade to 6.1-4 the error became much more strange:

PGFIO/stdio: Success
PGFIO-F-/unformatted read/unit=10/error code returned by host stdio - 0.
File name = b30.031.cpl6.r.0821-01-01-00000 unformatted, sequential access record = 2
In source file /home/veremeev/ccsm3_0/models/csm_share/cpl/cpl_iobin_mod.F90, at line number 233

I have the following in the env_conf
setenv CASE case2
setenv CASESTR case2
setenv COMP_ATM cam
setenv COMP_LND clm
setenv COMP_ICE csim
setenv COMP_OCN pop
setenv COMP_CPL cpl
setenv CSIM_MODE prognostic
setenv GRID T31_gx3v5
setenv RUN_TYPE branch # [startup,hybrid,branch]
setenv RUN_STARTDATE 1991-01-01 # [yyyy-mm-dd]
setenv RUN_REFCASE b30.031 # [only applies to hybrid or branch runs]
setenv RUN_REFDATE 0821-01-01 # [only applies to hybrid or branch runs]
setenv IPCC_MODE OFF # [OFF, 1870_CONTROL, 1870_TO_PRESENT, RAMP_CO2_ONLY,
# FUTURE_A1, FUTURE_A2, FUTURE_B1, FUTURE_B2]
setenv RAMP_CO2_START_YMD 00000000 # Start date of CAM CO2 ramp in form YYYYMMDD
# This variable MUST be set if IPCC_MODE is RAMP_CO2_ONLY
# This variable is ignored if IPCC_MODE is not RAMP_CO2_ONLY

#=========================================================================
# DERIVED ENVIRONMENT VARIABLES (user should not edit these)
#=========================================================================

setenv ATM_GRID `echo $GRID | sed s/_.*//`; setenv LND_GRID $ATM_GRID
setenv OCN_GRID `echo $GRID | sed s/.*_//`; setenv ICE_GRID $OCN_GRID

What's wrong??
 
These are first 512 bytes from the coupler restart file, read from NCAR

~/tmp$ od -x --read-bytes=512 b30.031.cpl6.r.0821-01-01-00000
0000000 0000 0001 6f66 6d72 7461 732d 7274 3532
0000020 3a36 616e 656d 463a 3039 645f 7461 5f65
0000040 6e61 5f64 6974 656d 633a 7361 4465 7365
0000060 3a63 7663 4973 2064 2020 2020 2020 2020
0000100 2020 2020 2020 2020 2020 2020 2020 2020
*
0000400 2020 2020 0000 0001 0000 0001 6548 6461
0000420 7265 6620 726f 6220 3033 302e 3133 632e
0000440 6c70 2e36 2e72 3830 3132 302d 2d31 3130
0000460 302d 3030 3030 2020 2020 2020 2020 2020
0000500 2020 2020 2020 2020 2020 2020 2020 2020
*

And these are first 512 bytes from the coupler restart file, created locally.

~/tmp$ od -x --read-bytes=512 case1.cpl6.r.1991-01-11-00000
0000000 0100 0000 6f66 6d72 7461 732d 7274 3532
0000020 3a36 616e 656d 463a 3039 645f 7461 5f65
0000040 6e61 5f64 6974 656d 633a 7361 4465 7365
0000060 3a63 7663 4973 2064 2020 2020 2020 2020
0000100 2020 2020 2020 2020 2020 2020 2020 2020
*
0000400 2020 2020 0100 0000 0100 0000 6548 6461
0000420 7265 6620 726f 6320 7361 3165 632e 6c70
0000440 2e36 2e72 3931 3139 302d 2d31 3131 302d
0000460 3030 3030 2020 2020 2020 2020 2020 2020
0000500 2020 2020 2020 2020 2020 2020 2020 2020
*

I have highlighted the differences, which seem to me offending.

Now the only solution existing in my head is to write a program to perform the reversal byte swapping.

I would appreciate other solutions.
 
Top