read fabm.yaml and call FABM configuration subroutines
Note
seems tmask is not initialised until called in mom() - i.e. after initialization - so all values are 0 here
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=rke), | intent(in) | :: | dt |
bio-geochemical time step as set by MOM2 [s] |
||
character(len=*), | intent(in), | optional | :: | yaml_file |
name of alternativ FABM configuration file |
subroutine fabm_configure(dt,yaml_file) !! read fabm.yaml and call FABM configuration subroutines real(rke), intent(in) :: dt !! bio-geochemical time step as set by MOM2 [s] character(len=*), intent(in), optional :: yaml_file !! name of alternativ FABM configuration file integer :: n print*, '==> Initializing FABM with (nt, nsrc, numbsc) =', & nt, nsrc, numsbc if (present(yaml_file)) then model => fabm_create_model(trim(yaml_file)) else model => fabm_create_model('fabm.yaml') end if nsurface = size(model%surface_state_variables) npelagic = size(model%interior_state_variables) nbottom = size(model%bottom_state_variables) if (nfabm .ne. npelagic) then print*, 'nt (UVic) = ',nt print*, 'nsrc (UVic) = ',nsrc print*, 'numsbc (UVic) = ',numsbc print*, 'nsurface = ',nsurface print*, 'npelagic = ',npelagic print*, 'nbottom = ',nbottom stop 'fabm_configure()' end if #ifdef DEBUG print*, imt,jmt,jmw !print*, jrow,js,je,is,ie print*, 'zt: ',shape(zt) print*, 't: ',shape(t) print*, 'sbc: ',shape(sbc) print*, 'src: ',shape(src) ! imt,km,jsmw:jemw,nsrc print*, 'source: ',shape(source) ! imt,km,jsmw:jemw print*, 'rho: ',shape(rho) !stop 112 #endif call model%set_domain(imt,km,jmt,dt) call model%set_domain_start(2,1,2) call model%set_domain_stop(imt-1,km,jmt-1) call model%set_mask(tmask,tmask(:,1,:)) call model%set_bottom_index(kmt) !! @note !! seems tmask is not initialised until called in mom() - !! i.e. after initialization - so all values are 0 here !! @endnote end subroutine fabm_configure