Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Nemo
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sam Hatfield
Nemo
Commits
465ac38c
Commit
465ac38c
authored
3 years ago
by
Clement Rousset
Browse files
Options
Downloads
Patches
Plain Diff
make closea more robust to ill-defined files
parent
e0b56e02
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/OCE/SBC/sbcclo.F90
+19
-17
19 additions, 17 deletions
src/OCE/SBC/sbcclo.F90
with
19 additions
and
17 deletions
src/OCE/SBC/sbcclo.F90
+
19
−
17
View file @
465ac38c
...
@@ -38,11 +38,11 @@ MODULE sbcclo
...
@@ -38,11 +38,11 @@ MODULE sbcclo
PUBLIC
sbc_clo
PUBLIC
sbc_clo
PUBLIC
sbc_clo_init
PUBLIC
sbc_clo_init
!
!
REAL
(
wp
),
PUBLIC
,
SAVE
,
ALLOCATABLE
,
DIMENSION
(:)
::
rsurfsrcg
,
rsurftrgg
!: closed sea source/target glo surface areas
REAL
(
wp
),
SAVE
,
ALLOCATABLE
,
DIMENSION
(:)
::
rsurfsrcg
,
rsurftrgg
!: closed sea source/target glo surface areas
REAL
(
wp
),
PUBLIC
,
SAVE
,
ALLOCATABLE
,
DIMENSION
(:)
::
rsurfsrcr
,
rsurftrgr
!: closed sea source/target rnf surface areas
REAL
(
wp
),
SAVE
,
ALLOCATABLE
,
DIMENSION
(:)
::
rsurfsrcr
,
rsurftrgr
!: closed sea source/target rnf surface areas
REAL
(
wp
),
PUBLIC
,
SAVE
,
ALLOCATABLE
,
DIMENSION
(:)
::
rsurfsrce
,
rsurftrge
!: closed sea source/target emp surface areas
REAL
(
wp
),
SAVE
,
ALLOCATABLE
,
DIMENSION
(:)
::
rsurfsrce
,
rsurftrge
!: closed sea source/target emp surface areas
!
!
INTEGER
,
PUBLIC
,
SAVE
,
ALLOCATABLE
,
DIMENSION
(:)
::
mcsgrpg
,
mcsgrpr
,
mcsgrpe
!: closed sea group for glo, rnf and emp
INTEGER
,
SAVE
,
ALLOCATABLE
,
DIMENSION
(:)
::
mcsgrpg
,
mcsgrpr
,
mcsgrpe
!: closed sea group for glo, rnf and emp
!
!
CONTAINS
CONTAINS
!
!
...
@@ -301,19 +301,21 @@ MODULE sbcclo
...
@@ -301,19 +301,21 @@ MODULE sbcclo
imsk_trg
=
kmsk_grp
*
kmsk_opnsea
imsk_trg
=
kmsk_grp
*
kmsk_opnsea
END
IF
END
IF
!
!
!! 3. Subtract residuals from source points
IF
(
zsurftrg
>
0._wp
)
THEN
! target area /=0
zcsfwf
=
zcsfw
/
zsurfsrc
!! 3. Subtract residuals from source points
pwcs
(:,:)
=
pwcs
(:,:)
-
zcsfwf
*
imsk_src
(:,:)
zcsfwf
=
zcsfw
/
zsurfsrc
pqcs
(:,:)
=
pqcs
(:,:)
+
rcp
*
zcsfwf
*
sst_m
(:,:)
*
imsk_src
(:,:)
pwcs
(:,:)
=
pwcs
(:,:)
-
zcsfwf
*
imsk_src
(:,:)
!
pqcs
(:,:)
=
pqcs
(:,:)
+
rcp
*
zcsfwf
*
sst_m
(:,:)
*
imsk_src
(:,:)
!! 4. Add residuals to target points
!
!! Do not use pqcs(:,:) = pqcs(:,:) - rcp * zcsfw * sst_m(:,:) / zsurftrg
!! 4. Add residuals to target points
!! as there is no reason heat will be conserved with this formulation
!! Do not use pqcs(:,:) = pqcs(:,:) - rcp * zcsfw * sst_m(:,:) / zsurftrg
zcsh
=
glob_sum
(
'closea'
,
e1e2t
(:,:)
*
rcp
*
zcsfwf
*
sst_m
(:,:)
*
imsk_src
(:,:)
)
!! as there is no reason heat will be conserved with this formulation
WHERE
(
imsk_trg
(:,:)
==
kcsgrp
(
jcs
)
)
zcsh
=
glob_sum
(
'closea'
,
e1e2t
(:,:)
*
rcp
*
zcsfwf
*
sst_m
(:,:)
*
imsk_src
(:,:)
)
pwcs
(:,:)
=
pwcs
(:,:)
+
zcsfw
/
zsurftrg
WHERE
(
imsk_trg
(:,:)
==
kcsgrp
(
jcs
)
)
pqcs
(:,:)
=
pqcs
(:,:)
-
zcsh
/
zsurftrg
pwcs
(:,:)
=
pwcs
(:,:)
+
zcsfw
/
zsurftrg
ENDWHERE
pqcs
(:,:)
=
pqcs
(:,:)
-
zcsh
/
zsurftrg
ENDWHERE
ENDIF
!
!
END
DO
! jcs
END
DO
! jcs
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment