Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netcdf fails to link on some systems: correct libs= statements #15

Closed
ajhenrique opened this issue Apr 23, 2019 · 10 comments
Closed

netcdf fails to link on some systems: correct libs= statements #15

ajhenrique opened this issue Apr 23, 2019 · 10 comments
Assignees

Comments

@ajhenrique
Copy link
Collaborator

Some link scripts need to be bugfixed for libs= statement that removes netcdf libs= settings. This occurs in link.theia but may occur in other scripts.

@ajhenrique ajhenrique self-assigned this Apr 23, 2019
@JessicaMeixner-NOAA
Copy link
Collaborator

I'm not sure I understand your issue. How can I replicate this issue?

@ajhenrique
Copy link
Collaborator Author

ajhenrique commented Apr 23, 2019

Try to compile the netcdf wrapper on Theia (NCEP's R&D machine) using comp.theia and link.theia. I have a fix for this and will implement on a bugfix branch.

@JessicaMeixner-NOAA
Copy link
Collaborator

So if on theia I do:

git clone https://github.com/NOAA-EMC/WW3
cd WW3
./setup model -c theia -s ???
./w3_make ww3_???

What are the ???

@mickaelaccensi
Copy link
Collaborator

could you try to use the cmplr.env system with:
./w3_setup model -c intel ( instead of theia )
in comp.theia and link.theia, I'm surprised the way the compiler can be defined as mpiifort or ifort -lmpi. It would be better to either compile with -c intel or -c mpt... anyway can you send your error message in the linking.

@j-gonzalezlopez
Copy link

j-gonzalezlopez commented Apr 25, 2019

Maybe not directly related, but I've had issues compiling for GRIB1/GRIB2 and NetCDF (using gfortran-8). The link.tmpl file doesn't include the if statement to assign the GRIB1 library to compile ww3_grib. I managed to successfully compile for GRIB1 by copying those lines from link.xlf into the link file created after calling ww3_setup the first time (I edited complr.env to use gfortran-8 and appropriate mpich under the gnu option). Still working on getting the compilation to work for GRIB2 and NetCDF. If this should be put into another new issue please let me know.

@JessicaMeixner-NOAA
Copy link
Collaborator

@j-gonzalezlopez If you want to compile with GRIB, I'd recommend looking at the comp/link.{theia, wcoss*} ones.

@mickaelaccensi : @ajhenrique and I discussed this morning about cleaning up all the comp.* link.* files so that we are using the cmplr.env system for everything (I think we talked about this a long time ago but I asked to wait until after the public release to do this). So we need to make updates to
model/bin/{w3_setup, cmpl.env, link.tmp and comp.tmp} so that when w3_setup is called:
source $path_b/cmplr.env
sed -e "s//$optl/" -e "s/<comp_seq>/$comp_seq/" -e "s/<comp_mpi>/$comp_mpi/" $path_b/link.tmpl > $path_b/link

and

sed -e "s//$optc/" -e "s/<comp_seq>/$comp_seq/" -e "s/<comp_mpi>/$comp_mpi/" $path_b/comp.tmpl > $path_b/comp

happen we get the right options. On a side note, in the future, we might make an option to where we get some of these compile options from a higher level script (for example when compiling in a coupled model).

@JessicaMeixner-NOAA
Copy link
Collaborator

@mickaelaccensi Another question: Do you know who the zeus_* references are for? I know NOAA used to have a zeus, so I just want to confirm it is that so we can update those and make sure I'm not erasing something someone else needed.

@mickaelaccensi
Copy link
Collaborator

I totally agree with the idea of cleaning up all the comp and link files and just keep the comp.tmpl and link.tmpl !

about the zeus, I think it was only used at NOAA.

@ajhenrique
Copy link
Collaborator Author

I'll start a feature branch of my fork and add the changes for grib to comp.tmpl and link.tmpl for the develop branch. We can discuss approach for eliminating comp and link files during our repo managers meeting on May 6th.

@ajhenrique
Copy link
Collaborator Author

ajhenrique commented May 15, 2019

This issue had morphed into the generalization of comp/link scripts using cmplr.env and single comp.tmpl and link.tmpl scripts (issue #19).

aliabdolali pushed a commit that referenced this issue Nov 5, 2020
* Fb oasis t+0 (#13)

In the original code a coupling lag had to be used, coupling took place at the last time step but not at the first, and the coupling fields had to be written in an oasis restart file. With this ticket, the program can run in a different way by not using a coupling lag, coupling taking place at the first time step but not the last, and the coupling fields are written in the wave restart file - no extra oasis restart file needed.

* Fb uprstr inp (#15)

Enhancement to improve the way in which input data is read in and logged by the ww3_uprstr program:
  * read in variables specific to the update process selected
  * output the values provided in the ww3_uprstr.out log file
  * update the .inp template file and regtests to improve clarity and work with the changes
  * add capability to read inputs from a namelist (ww3_uprstr.nml) file

* Bf unconforming where in coupling routines (#17)

* Fix non-conforming WHERE statements in coupled routines
* Stop comparing history lines in OASIS rmp files

* Changes for efficient SMC grid coupling (#16)

* Changes for efficient SMC grid coupling
* Ensure consistency between SMC coupled test nml and inp files

Co-authored-by: Juan Manuel Castillo Sanchez <[email protected]>
Co-authored-by: Andy Saulter <[email protected]>
JessicaMeixner-NOAA pushed a commit to JessicaMeixner-NOAA/WW3 that referenced this issue Feb 16, 2021
Enhancement to improve the way in which input data is read in and logged by the ww3_uprstr program:
  * read in variables specific to the update process selected
  * output the values provided in the ww3_uprstr.out log file
  * update the .inp template file and regtests to improve clarity and work with the changes
  * add capability to read inputs from a namelist (ww3_uprstr.nml) file
aliabdolali added a commit that referenced this issue May 18, 2021
This PR adds new fields that can be sent (mean wave number, mean wave period, total ocean wind stress) and received (air density, wind stress) to/from other models via OASIS coupling, which will also be available in the model output. The fields that can be received via coupling can also be read from an external file, and using a homogeneous ice fraction is now activated when using '.inp' input files, as it was already possible to do it using '.nml' input files. In order to add this functionality it was necessary to modify the format of the ww3_shel.inp and ww3_multi.inp files, so that new flags controlling if these fields are used can be read. Furthermore, the format of the ww3_outf.inp file must be modified to accommodate the new output fields available.

If no air density is read from file or via coupling, the default constant value is used. The infrastructure to read and use the wind stress is already in place, but the actual use of wind stress to drive the model is not implemented yet and it will be the aim of issue #337

* Fb oasis t+0 (#13)

In the original code a coupling lag had to be used, coupling took place at the last time step but not at the first, and the coupling fields had to be written in an oasis restart file. With this ticket, the program can run in a different way by not using a coupling lag, coupling taking place at the first time step but not the last, and the coupling fields are written in the wave restart file - no extra oasis restart file needed.

* Fb uprstr inp (#15)

Enhancement to improve the way in which input data is read in and logged by the ww3_uprstr program:
  * read in variables specific to the update process selected
  * output the values provided in the ww3_uprstr.out log file
  * update the .inp template file and regtests to improve clarity and work with the changes
  * add capability to read inputs from a namelist (ww3_uprstr.nml) file

* First set of changes, still testing

* Some fixes

* Further changes mainly fixing vector boundaries

* Main changes

* Most changes already present, only need to write in output and restart

* Further changes - activate coupling

* Bug fixes to make the code compile

* Further changes to run regtests

* Minor fixes for output, manual, and switches

* Small fix to comments in model input

* Remove some lines that had to be removed but were overlooked

* Substitute ATTX and ATXX switches by WNTX and WNXX; add comments
regarding last modification date

* Change in file missed in latest commit

* Minor changes fixing version change

* Small fixes after reviewer's comments and to fix regtest

* Changes to pass regtests

* Addition of a new regtest and small fixes to ww3_prnc

* Time-interpolate air density when read from file

* Ensure that units are consistent

* Restore long name in metadata for new fieds, and update code version for
input files needed in regtest

* Update last modification date; corrections for new output field: WNMEAN
has now index (2,19) instead of (2,18)

* Fixes from Jessica Meixner; update date of last change in restart file

* Small fix to the format of the example input file ww3_multi.inp

* Some fixes after merging with latest version of develop

* Correct one version number

* Fix the header of the table printed in log.ww3, should not cause changes
in the output

* Minor fix in the ww3_shel.inp file of one of the regtests

* Update ww3_shel.inp

* Some fixes and improvements that were proposed during the review process

* Added comment to the new regtests implemented in ww3_tp2.15

Co-authored-by: Andy Saulter <[email protected]>
Co-authored-by: ukmo-chris.bunney <[email protected]>
Co-authored-by: Ali.Abdolali <[email protected]>
Co-authored-by: aliabdolali <[email protected]>
Co-authored-by: Chris Bunney <[email protected]>
DeniseWorthen referenced this issue in DeniseWorthen/WW3 Feb 28, 2022
Add ww3a grid to dev/unified
MatthewMasarik-NOAA pushed a commit to MatthewMasarik-NOAA/WW3 that referenced this issue Dec 14, 2023
Langmuir PR: regtest and documentation polishing
mvertens added a commit to mvertens/WW3 that referenced this issue Aug 28, 2024
New wave attenuation capability and now pass sea-ice thickness to ww3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants