I stumbled upon an issue in the ana_tclima.h that does not work as intended. It has the DOUBLE_GYRE example from ROMS test-cases but even for this does not work since it misses some definitions I presume. In the original analytical climatology we have:
Code: Select all
#if defined DOUBLE_GYRE
        val1=(44.69_r8/39.382_r8)**2
        val2=val1*(rho0*100.0_r8/g)*                                    &
     &       (5.0E-5_r8/((42.689_r8/44.69_r8)**2))
        DO k=1,N(ng)
          DO j=JstrT,JendT
            DO i=IstrT,IendT
              val3=T0(ng)+val2*EXP(GRID(ng)%z_r(i,j,k)/100.0_r8)*       &
     &             (10.0_r8-0.4_r8*TANH(GRID(ng)%z_r(i,j,k)/100.0_r8))
              val4=GRID(ng)%yr(i,j)/el(ng)
              CLIMA(ng)%tclm(i,j,k,itemp)=val3-3.0_r8*val4
Anyways, I came up with some modifications that now works just fine for me that I share here. But be aware that I'm no Fortran expert!
The modified lines in the version that works for me are:
Code: Select all
!
      USE mod_param
      USE mod_grid
      USE mod_ncparam
!
! Imported variable declarations.
!
      integer, intent(in) :: ng, tile, model
!
!  Local variable declarations.
!
      character (len=*), parameter :: MyFile =                          &
     &  __FILE__
!
#include "tile.h"
!
#ifdef SOLVE3D
      CALL ana_tclima_tile (ng, tile, model,                            &
     &                      LBi, UBi, LBj, UBj,                         &
     &                      IminS, ImaxS, JminS, JmaxS,                 &
     &                      GRID(ng) % z_r)
#else
      CALL ana_tclima_tile (ng, tile, model,                            &
     &                      LBi, UBi, LBj, UBj,                         &
     &                      IminS, ImaxS, JminS, JmaxS,                 &
     &                      GRID(ng) % h)
#endif
Code: Select all
!***********************************************************************
      SUBROUTINE ana_tclima_tile (ng, tile, model,                      &
     &                            LBi, UBi, LBj, UBj,                   &
     &                            IminS, ImaxS, JminS, JmaxS,           &
#ifdef SOLVE3D
     &                            z_r)
#else
     &                            h)
#endif
!***********************************************************************