Main menu

Navigation

how to write this Input header file

5 posts / 0 new
Last post
jinyishuai@...
how to write this Input header file

Dear professors:
Recently i want to do some forcing and i change forcing_pt_interior_nml in pop2.But the results are as folllows:

WARNING: Input header file does not exist
for file: /home/jys/work/cesm/archive/PB30/ocn/climate_1/temp_clim_pre.dat.hdr
Assuming fields will be read in sequential order

Interior PT Monthly file read: /home/jys/work/cesm/archive/PB30/ocn/climate_1/temp_clim_pre.dat

the temp_clim_pre.dat is made by myself,but i do not know how to create header file.
I am looking forward for your helping!
Best wishes!
Jin

njn01

This ocn.log file message is only a warning message, not an error message. In CESM POP2,  you do not always need a companion header file (*.hdr) to accompany your binary input file.  However, sometimes you do, depending on the contents of the file, so you do need to be careful when reading binary files, and that is what the warning message is trying to tell you.

If you created the dataset yourself, then you might consider re-creating it in netCDF form.  If not, then you can proceed without the .hdr file, but I strongly recommend that you  make certain that the ocean model reads your binary file correctly, because dimensions and ordering matter.

You are venturing fairly far into unsupported territory with your changes, so please review the CESM POP2 forcing and io modules carefully and then confirm your input data are being read correctly. This would involve adding new code to POP2 to support the output of your initial conditions. (One way to do this is to add support for writing out your initial conditions into a time-averaged history file ("tavg file") and setting up a test case to write averages every timestep for one ocean-model day.  You can find info on how to do this in the CESM POP2 FAQ.) 

If you are also modifying input namelist settings, I recommend that you also add debugging code to give you enough information to be confident that your changes ae doing what you expect them to do.

 

 

jinyishuai@...

thanks so much!

li.xjpath@...

Hi,Jin, 

I'm doing the same thing as you have done, and I met the same problem as yours. Could you provide some details about how to solve this problem. e.g. the dimention and order of the forcing file. I have been confused for many days...

Many thanks for your help!

Xiaojing

njn01

The customization of the pop2 forcing files is not documented, so you will need to review the code to figure out what the model expects in terms of dimensions and ordering.

I recommend that you look at subroutine init_pt_interior in the forcing_pt_interior.F90 module and find the part where the various versions of the forcing files (annual, monthly, etc) are read in. That will help you figure out what the ordering needs to be for your data file to be correctly read by the model. You will also need to become familiar with the routine "data_set" in module io.F90 and the other io_*.F90 subroutines to get a clearer picture of how data files are handled by pop2.

As I wrote to the previous poster, I recommend that you create your customized foring file in netCDF format. Using netCDF format avoids any binary-file "endian" issues. Note that if you use a binary file, the companion *.hdr file is not required, but be aware if it is not available, the model will generate a warning message. The message is a caution to the user, not an error message. 

Finally, to apply your forcing_pt_interior changes, use the user_nl_pop file in your $case directory to override the CESM defaults for the forcing_pt_interior_nml namelist.

Log in or register to post comments

Who's new

  • 935881015@...
  • zwolff@...
  • daigk@...
  • kimberly.a.casey@...
  • qin-y14@...