geoschem / geos-chem

GEOS-Chem "Science Codebase" repository. Contains GEOS-Chem science routines, run directory generation scripts, and interface code. This repository is used as a submodule within the GCClassic and GCHP wrappers, as well as in other modeling contexts (external ESMs).
http://geos-chem.org
Other
169 stars 165 forks source link

[QUESTION]an error of creating the run directory in GC 13.4.1 #1307

Closed zhiweistu closed 2 years ago

zhiweistu commented 2 years ago

Ask a question about GEOS-Chem:

Hi, everyone. I am quite new to GC. My GC is 13.4.1. I try creating the run directory, choosing the fullchem, standard simulation, but there is an error.

image

I think the error may stem from missing restart files,but I set “ExtData” as the data read path, and GC restart file is in GEOSCHEM_RESTARTS(“ExtData” subdirectory).

image image

Looking forward for your helps, thanks!

lizziel commented 2 years ago

Hi @zhiweistu, try finding the following lines in createRunDir.sh which you are using create the run directory:

    printf "\n  -- No sample restart provided for this simulation."
    printf "\n     You will need to provide an initial restart file or disable"
    printf "\n     GC_RESTARTS in HEMCO_Config.rc to initialize your simulation"
    printf "\n     with default background species concentrations.\n"

Then add this line to that block using the same indentation, and rerun. This should print out what restart file is being looked for, which might help figure out the problem. I suspect there may be something wrong with the path.

printf "${sample_rst}"

zhiweistu commented 2 years ago

Hi@lizziel, thanks for your help. As you said, the “restart file error” is path wrong. I added this line in block, and I found it needed restart file”GEOSChem.Restart.fullchem.20190701_0000z.nc4 ”, and the path was .../GEOSCHEM_RESTARTS/v2021-09. image

The v2021-09 did not exist before(I am curious about why it choose that path), so I create it, and added the restart file in the directory. The error about restart file disappeared. But there are still some errors about “can not read History.rc”, error about “HEAD”. Please give me some helps again, thanks for your helps. image

lizziel commented 2 years ago

Hi @zhiweistu, I am glad that helped. I failed to notice before the first error message of realpath: command not found. That is happening when calling init_rd.sh, a helper script used to make substitutions within our config file templates. It's possible your system does not have the realpath function available. Open init_rd.sh and try using readlink -f in place of realpath and see if that fixes the rest of the problems.

Regarding the restart files, did you download ExtData a while ago? If yes, you should sync to the latest data so that you have everything you need to run the version you are using. We have a tool called BashDataCatalog that you can use to do this. For documentation see https://geos-chem.readthedocs.io/en/latest/geos-chem-shared-docs/supplemental-guides/bashdatacatalog.html.

zhiweistu commented 2 years ago

Hi@lizziel, I am so grateful for your help. I used readlink -f in place of real path, it successfully solved the error about read file. But the last error about “HEAD” still existed. Some helps please, thanks! image

lizziel commented 2 years ago

Hi @zhiweistu, what version of git are you using? I think the error is occurring in this line: code_branch=$(git rev-parse --abbrev-ref HEAD)

Try commenting out that line along with the line further down that uses ${code_branch}. Also add the following print after cd ${gc_dir} (two lines before setting code_branch) to make sure the path to GEOS-Chem is correct. printf "GEOS-Chem repository path: ${gcdir}"

This code is supposed to get the version information of the GEOS-Chem repository to print to run directory creation log file rundir.version. If that is not working then I think it is either due to a very old git version or a problem getting to the GEOS-Chem directory before running the git commands.

zhiweistu commented 2 years ago

Hi@lizziel, thanks for the detailed instructions. My git version is 1.7.1. I made 3 code changes according to your instructions. image (modified code )

It printed the “GEOS-Chem repository path: /vol-th/home/hym/GCClassic/src/GEOS-Chem”, the path is right. image (Geos-chem repository path)

Commenting out the code, the information about error “fatal: ambiguous argument ‘HEAD’ : unknown revision or path not in the working tree” disappeared. But the error “fatal : bad default revision ‘HEAD’ ” still existed. So, dose it mean the error stem from the version of git?
Best Regards image (run result)

zhiweistu commented 2 years ago

I opened the run_dir. version, and there is no information about GEOs-Chem repository. image

lizziel commented 2 years ago

I think the problem is likely your git. Version 1.7.1 is very old, released in 2010, and 1.7.12 is the latest patch for it (meaning you are missing 11 patches with bug fixes following 1.7.1). For comparison, here at Harvard we use 2.17. Try updating to more a recent git and see if that solves the remaining issues.

zhiweistu commented 2 years ago

Hi@lizziel, thanks for the detailed instructions. It successfully solved the problem I had before. But when I compile the file, it always remind me that ifort: command line remark #10120: overriding '-O3' with '-O2'. I am not sure if there is an error, my compiler is ifort v13.0, thanks for your help! Best Regards 1658664278973 1658664173041

lizziel commented 2 years ago

Hi @zhiweistu, I am glad that fixed the problem. Regarding the compiler remark, I suggest switching to a newer compiler rather than do a deep dive into what the issue is. ifort 13 is very old and we no longer test with it. You can try a newer version of ifort, or use gfortran.

zhiweistu commented 2 years ago

Hi@lizziel, thanks for your help. I used ifort v18, and the previous error disappeared. I am sorry to bother you again. When I run the executable gcclassic, The following error message appeared. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

In Ncrd_3d_R4 #2: NetCDF: HDF error 65536 1

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Code stopped from DO_ERR_OUT (in module NcdfUtil/m_do_err_out.F90)

This is an error that was encountered in one of the netCDF I/O modules, which indicates an error in writing to or reading from a netCDF file!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

I noticed it could not recognize the file format, how can I resolve it? image (13.4.1)

Supplementary information I have been using gc 12.6.0 before, and its defined diagnostic collections is normal. The format file is CFIO. My netcdf version is 4.3.2, netcdf - fortran version is 4.2, hdf5 version is 1.8.9. Because I can used the gc 12.6.0 normally, so I think the netcdf library should be normal. I am so grateful for your helps ! image (12.6.0)

lizziel commented 2 years ago

Hi @zhiweistu, since this new issue is not related to run directory creation it would be best as a new issue. Could you create a new one on GitHub for it? I will close out this issue since it now resolved.

zhiweistu commented 2 years ago

Hi@lizziel, you successfully solved my issue about creating the run directory. I am so grateful. I will create a new one issue. Thanks for your helps!