How to use forcing package

Report or discuss software problems and other woes

Moderators: arango, robertson

Post Reply
Message
Author
zhouwei
Posts: 29
Joined: Thu Dec 21, 2006 10:25 pm
Location: South China Sea Institute of Oceanology

How to use forcing package

#1 Unread post by zhouwei »

Hello,everyone.
Recently,I was trying to compile the forcing package in Fedora 7 . I have modified CFT and LDR in Makefile.Gnu as follows
CFT = gfortran
LDR = gfortran
When I wanted to make it ,the following errors appeared :

Code: Select all

def_info.F: In function ‘def_info’:
def_info.F:158: warning: Function return value not set
gfortran -c -DNO_EXIT -g -O2 def_out.F
gfortran -c -DNO_EXIT -g -O2 def_var.F
gfortran -c -DNO_EXIT -g -O2 get_date.F
 In file get_date.F:111

      mon=1                                                             
        1
Error: Symbol 'mon' at (1) has no IMPLICIT type
make: *** [get_date.o] Error 1 

 
Then I added

Code: Select all

#define sun
in the cppdefs.h ,the problem about get_date.F seems to be solved ,but the following errors appeared :

Code: Select all

gfortran -c -DNO_EXIT -g -O2 forcing.F
gfortran -c -DNO_EXIT -g -O2 bes1d.F
gfortran -c -DNO_EXIT -g -O2 bes2d.F
gfortran -c -DNO_EXIT -g -O2 cvector.F
gfortran -c -DNO_EXIT -g -O2 crash.F
gfortran -c -DNO_EXIT -g -O2 day_code.F
gfortran -c -DNO_EXIT -g -O2 def_info.F
def_info.F: In function ‘def_info’:
def_info.F:158: warning: Function return value not set
gfortran -c -DNO_EXIT -g -O2 def_out.F
gfortran -c -DNO_EXIT -g -O2 get_date.F
gfortran -c -DNO_EXIT -g -O2 get_grdfld.F
gfortran -c -DNO_EXIT -g -O2 get_grid.F
 In file get_grid.F:28

     &        dimid, dimsiz, i, ncgrdid, ndims, ngatts, nvars, nvatts,  
                                      1
Error: Symbol 'ncgrdid' at (1) already has basic type of INTEGER
 In file get_grid.F:65

          dimid=i                                                       
              1
Error: Symbol 'dimid' at (1) has no IMPLICIT type
 In file get_grid.F:66

          status=nf_inq_dim(ncgrdid,dimid,dimnam,dimsiz)                
                                                      1
Error: Symbol 'dimsiz' at (1) has no IMPLICIT type
 In file get_grid.F:64

        do i=1,ndims                                                    
           1
Error: Symbol 'i' at (1) has no IMPLICIT type
 In file get_grid.F:71

          ldim=lenstr(dimnam)                                           
             1
Error: Symbol 'ldim' at (1) has no IMPLICIT type
 In file get_grid.F:105

            lvar=lenstr(varnam)                                         
               1
Error: Symbol 'lvar' at (1) has no IMPLICIT type
 In file get_grid.F:47

      lstr=lenstr(grdname)                                              
         1
Error: Symbol 'lstr' at (1) has no IMPLICIT type
 In file get_grid.F:59

      status=nf_inq(ncgrdid,ndims,nvars,ngatts,recdim)                  
                                1
Error: Symbol 'ndims' at (1) has no IMPLICIT type
 In file get_grid.F:102

          status=nf_inq_var(ncgrdid,varid,varnam,vartyp,nvdims,vdims,   
                                                             1
Error: Symbol 'nvdims' at (1) has no IMPLICIT type
 In file get_grid.F:59

      status=nf_inq(ncgrdid,ndims,nvars,ngatts,recdim)                  
                                      1
Error: Symbol 'nvars' at (1) has no IMPLICIT type
 In file get_grid.F:59

      status=nf_inq(ncgrdid,ndims,nvars,ngatts,recdim)                  
                                             1
Error: Symbol 'ngatts' at (1) has no IMPLICIT type
 In file get_grid.F:103

     &                      nvatts)                                     
                                 1
Error: Symbol 'nvatts' at (1) has no IMPLICIT type
 In file get_grid.F:59

      status=nf_inq(ncgrdid,ndims,nvars,ngatts,recdim)                  
                                                    1
Error: Symbol 'recdim' at (1) has no IMPLICIT type
 In file get_grid.F:48

      status=nf_open(grdname(1:lstr),nf_nowrite,ncgrdid)                
           1
Error: Symbol 'status' at (1) has no IMPLICIT type
 In file get_grid.F:101

          varid=i                                                       
              1
Error: Symbol 'varid' at (1) has no IMPLICIT type
 In file get_grid.F:102

          status=nf_inq_var(ncgrdid,varid,varnam,vartyp,nvdims,vdims,   
                                                      1
Error: Symbol 'vartyp' at (1) has no IMPLICIT type
make: *** [get_grid.o] Error 1
Is there any other things to be set ?
I think it is difficult to use the Fortran codes for the initialization and forcing packages for a new user of ROMS .Does anyone have the matlab scripts to build the forcing package? If anybody can share these matlab scripts,it will greatly lessen the time new users spend on learning ROMS.
Thank you in advance.

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#2 Unread post by kate »

I don't know anyone who has used those old Fortran codes in quite some time now. There are Matlab scripts based on Manu's RNT (http://www.katie-girl.org/RNT/). For the Forcing, though, if your original files are on a regular lat/lon grid, ROMS itself can do the interpolations to your grid internally. The files have to be NetCDF with the right naming schemes and time origin, but can be used for more than one ROMS grid. We have the CORE forcing files beat into shape - what forcing are you using?

Also, some of us have a long-term goal of replacing the Matlab scripts with Python scripts.

zhouwei
Posts: 29
Joined: Thu Dec 21, 2006 10:25 pm
Location: South China Sea Institute of Oceanology

#3 Unread post by zhouwei »

Hi,Kate. Thanks for your reply.

Sorry,I am not quite sure about what do you mean by
We have the CORE forcing files beat into shape

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

#4 Unread post by kate »

http://data1.gfdl.noaa.gov/nomads/forms/mom4/CORE.html

They are NetCDF files, but our calendar differs from theirs. Liz Dobbins added a leap day to each year needing one and put the reference time at the beginning of 1900. I think she had to add some sort of grid coordinate attribute too.

julian.kuhlmann
Posts: 24
Joined: Wed Sep 07, 2011 4:13 pm
Location: GFZ Potsdam

Re: How to use forcing package

#5 Unread post by julian.kuhlmann »

Are there any news about Python/Fortran/Matlab/whatever packages to create forcing files?

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: How to use forcing package

#6 Unread post by kate »

What are you looking for, exactly? We have python tools to do some things, but are still using CORE (now CORE2) for the atmospheric forcing and letting ROMS do the interpolation.

Others will no doubt chime in with Matlab offers once the needs are clearer.

julian.kuhlmann
Posts: 24
Joined: Wed Sep 07, 2011 4:13 pm
Location: GFZ Potsdam

Re: How to use forcing package

#7 Unread post by julian.kuhlmann »

I'm basically looking for something equivalent to the Roms-tools that come with the ROMS-Agrif distribution, but they are not really compatible with Rutgers ROMS. They let you pick a study region and time period and provide all grd/ini/frc/blk/clm/bry/... files that one needs for a simulation. I was wondering if there was something similar for Rutgers ROMS or how you guys created these files otherwise?

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: How to use forcing package

#8 Unread post by kate »

It depends. You can set something up like that for reasonable defaults, but it's not the right forcing/bathy/boundary for special cases. We have a set of forcing files that are good for hindcasts for the years 1958-2007 or so. Many in other groups want newer years. We have global bathymetry, but there's now a better one for Alaska waters and a third for the Arctic. So again, what exactly are you trying to do? Are six-hourly global hindcast winds going to do the job or do you need something finer in time or space?

Also, there are helpful bits of code out there in Matlab, Python, Ferret, etc. Which way are you hoping to go?

julian.kuhlmann
Posts: 24
Joined: Wed Sep 07, 2011 4:13 pm
Location: GFZ Potsdam

Re: How to use forcing package

#9 Unread post by julian.kuhlmann »

Thank you, that sounds great! I just need something to start with, later I might replace pieces that turn out to be problematic. I'm planning a hindcast simulation of the years 2002-2006 for the area around South Africa and a piece of the ACC, probably around 1/4-degree resolution. 6-hourly winds are what I'm planning with, either NCEP/NCAR or ERA-40/-Interim. Up to now I work with Matlab, but I'm not so excited about it, so I actually wouldn't mind some Python. But Matlab's fine, too. I don't really know Ferret. Fortran or Shell scripts would be better!

julian.kuhlmann
Posts: 24
Joined: Wed Sep 07, 2011 4:13 pm
Location: GFZ Potsdam

Re: How to use forcing package

#10 Unread post by julian.kuhlmann »

Hi Kate, were you able to find some pieces of code that could help me?

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: How to use forcing package

#11 Unread post by kate »

Sorry, I've been out of town. For the forcing, we have CORE2 files that run out of the box, no scripts needed. http://data1.gfdl.noaa.gov/nomads/forms ... OREv2.html People at Rutgers have scripts to adjust the calendar in these files, that's it. Do you know what calendar you plan to use?

What else are you looking for?

julian.kuhlmann
Posts: 24
Joined: Wed Sep 07, 2011 4:13 pm
Location: GFZ Potsdam

Re: How to use forcing package

#12 Unread post by julian.kuhlmann »

CORE2 looks good, thank you! I think I can use this. The other thing I need is the ini- and especially bry-files for the open edges. Where do you usually get these from?

User avatar
kate
Posts: 4091
Joined: Wed Jul 02, 2003 5:29 pm
Location: CFOS/UAF, USA

Re: How to use forcing package

#13 Unread post by kate »

I use pyroms to extract from SODA files. I believe the monthlies are online, but a colleague of mine sent a hard drive to Jim Carton's group and has the 5-daily files. These have been working well for us.

Post Reply