problem with station output in COAWST

Bug reports, work arounds and fixes

Moderators: arango, robertson

Post Reply
Message
Author
ggarcia
Posts: 2
Joined: Fri Jun 10, 2011 9:56 pm
Location: Pacific Northwest National Laboratory

problem with station output in COAWST

#1 Unread post by ggarcia »

Dear all,

I am trying to get station output in COAWST (revision 917) and have been having problems at the compilation stage. I was wondering if any of you have seen this error before or have been able to get station output with one of the most recent revisions of COAWST.

Thanks in advance,

Gabriel García


Some details:

The only thing I have added to the cppdefs.h file is #define STATIONS, do I need to add something else?

Screen output:
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 592)
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 608)
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 624)
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 640)
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 673)
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 690)
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 707)
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 724)
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 741)
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 822)
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 838)
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 854)
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 870)
PGF90-S-0155-Could not resolve generic procedure netcdf_put_fvar (wrt_station.f90: 886)
PGF90-S-0038-Symbol, staname, has not been explicitly declared (wrt_station.f90)
PGF90-S-0038-Symbol, tstaindx, has not been explicitly declared (wrt_station.f90)
PGF90-S-0038-Symbol, ncstaid, has not been explicitly declared (wrt_station.f90)
PGF90-S-0038-Symbol, stavid, has not been explicitly declared (wrt_station.f90)
0 inform, 0 warnings, 18 severes, 0 fatal for wrt_station
make: *** [/scratch/temp/ggarcia/86-like-80-short-periodic//Build/wrt_station.o] Error 2

These are lines 567 to 599 of wrt_station.f90. The compilation does not complain with vbar_stokes. There are a few calls to variables that are different, among these two output parameters.

Code: Select all

!
!  Write out 2D V-momentum Stokes drift velocity.
!
      IF (Sout(idV2Sd,ng)) THEN
        scale=1.0_r8
        CALL extract_sta2d (ng, iNLM, Cgrid, idV2Sd, v2dvar,            &
     &                      LBi, UBi, LBj, UBj,                         &
     &                      scale, OCEAN(ng) % ubar_stokes,             &
     &                      Nstation(ng), Xpos, Ypos, psta)
        CALL netcdf_put_fvar (ng, iNLM, STA(ng)%name,                   &
     &                        TRIM(Vname(1,idV2Sd)), psta,              &
     &                        (/1,STA(ng)%Rindex/), (/Nstation(ng),1/), &
     &                        ncid = STA(ng)%ncid,                      &
     &                        varid = STA(ng)%Vid(idV2Sd))
        IF (exit_flag.ne.NoError) RETURN
      END IF
!
!  Write out 2D U-momentum Stokes drift velocity.
!
      IF (Sout(idU2Sd,ng)) THEN
        scale=1.0_r8
        CALL extract_sta2d (ng, iNLM, Cgrid, idU2Sd, u2dvar,            &
     &                      LBi, UBi, LBj, UBj,                         &
     &                      scale, OCEAN(ng) % ubar_stokes,             &
     &                      Nstation(ng), Xpos, Ypos, psta)
        CALL netcdf_put_fvar (ng, iNLM, STAname(ng),                    &
     &                        TRIM(Vname(1,idU2Sd)), psta,              &
     &                        (/1,tSTAindx(ng)/), (/Nstation(ng),1/),   &
     &                        ncid = ncSTAid(ng),                       &
     &                        varid = staVid(idU2Sd,ng))
        IF (exit_flag.ne.NoError) RETURN
      END IF
!


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

Re: problem with station output in COAWST

#2 Unread post by kate »

Gotta love it. The style changed and you can tell from the errors that the new style should be used:

Code: Select all

        CALL netcdf_put_fvar (ng, iNLM, STA(ng)%name,                   &
     &                        TRIM(Vname(1,idU2Sd)), psta,              &
     &                        (/1,STA(ng)%Rindex/), (/Nstation(ng),1/), &
     &                        ncid = STA(ng)%ncid,                      &
     &                        varid = STA(ng)%Vid(idU2Sd))

jcwarner
Posts: 1182
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: problem with station output in COAWST

#3 Unread post by jcwarner »

think you need to do an update.
the current version has

!
! Write out 2D U-momentum Stokes drift velocity.
!
IF (Sout(idU2Sd,ng)) THEN
scale=1.0_r8
CALL extract_sta2d (ng, iNLM, Cgrid, idU2Sd, u2dvar, &
& LBi, UBi, LBj, UBj, &
& scale, OCEAN(ng) % ubar_stokes, &
& Nstation(ng), Xpos, Ypos, psta)
CALL netcdf_put_fvar (ng, iNLM, STA(ng)%name, &
& TRIM(Vname(1,idU2Sd)), psta, &
& (/1,STA(ng)%Rindex/), (/Nstation(ng),1/), &
& ncid = STA(ng)%ncid, &
& varid = STA(ng)%Vid(idU2Sd))
IF (exit_flag.ne.NoError) RETURN
END IF
!

all of this was re-written (as many things are) to now use more structures.

ggarcia
Posts: 2
Joined: Fri Jun 10, 2011 9:56 pm
Location: Pacific Northwest National Laboratory

Re: problem with station output in COAWST

#4 Unread post by ggarcia »

Thanks both for the quick responses.

I have already checked with the latest revision (938) and still get the same error. The wrt_station.F file is identical in both code versions. Looking a bit further, it seems like there are some variables that use the 'old' style while most use the 'new' style. I am attaching my wrt_station.f90 file for reference. For example, it tries to write U-stokes twice, using both syntax styles.

I tried changing all the times where

Code: Select all

varid = staVid(id,ng)
is still used with

Code: Select all

varid = STA(ng)%Vid(id)
and the model compiles. When I run it, the station.nc file is created with some of the requested (in the station.in) variables only. For example ubar_stokes does not make it into the stations.nc file. However no variable has valid data. I'll report back if I am able to figure it out.

Thanks again,

Gabriel
Attachments
wrt_station.f90
(42.56 KiB) Downloaded 372 times

jcwarner
Posts: 1182
Joined: Wed Dec 31, 2003 6:16 pm
Location: USGS, USA

Re: problem with station output in COAWST

#5 Unread post by jcwarner »

ok. i just did some updates to the wrt_station. sorry.
there are a lot of changes in the format to call the routine. and it is repeated a billion times. so i missed some.
pls do an update and let me know if it is ok now.

Post Reply